Calling Javascript after new post
-
<?php function trigger_alert() { echo '<script language="Javascript">alert("Your entry has been submitted. You may have to wait for an Editor to approve it.")</script>'; } function some_post_actions( $post_ID ) { $friends = 'email@gmail.com'; wp_mail( $friends, "Site updated", 'The blog site has been updated. Please check for a new entry.' ); }?><?php add_action('admin_enqueue_scripts', 'trigger_alert'); return $post_ID;?>
So thats what I have. The emailing of the designated user works fine but I simply cannot get the Javascript alert to be called successfully.
Any pointers would be gratefully received 🙂
Kev.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Calling Javascript after new post’ is closed to new replies.