My function isn't working
-
I am trying to write a function that whenever a post is updated will run a javascript function. Here is what I have so far:
add_action('post_updated','my_place_pin'); function my_place_pin() { echo '<script type="text/javascript">' , 'admin__place_pin();' , '</script>' ; }
admin_place_pin is a javascript function inside a google javascript folder. I believe it is a standard google maps function. Here is the code for it:
jQuery('#admin_place_pin').click(function(event){ event.preventDefault(); admin_codeAddress(); });
When I click the “Update” button on the admin side the function should be reading the address information and placing a pin on google maps. Currently it appears to be doing nada.
Any help is really appreciated! Being able to run this function would save me hours and hours of macro time. Thanks!
- The topic ‘My function isn't working’ is closed to new replies.