Forums

Should this script be working? (1 post)

  1. Michael Davis
    Member
    Posted 8 months ago #

    What I mean is, do I need to do something more because of the ajax or should it just work? This is in my functions.php for the theme but as far as I can tell, it's being ignored as is. Am I missing something?

    add_action( 'admin_head', 'ajax_action_stuff' );
    function ajax_action_stuff() { ?>
    	<script type="text/javascript">
    	$('#pnd_title_url').blur(function() {
    		$.ajax({url: $(this).val(),
    		beforeSend: function() {jQuery("#loading").show("slow");},
    		complete: function() { jQuery("#loading").hide("fast");},
    		success: function(data, textStatus) {jQuery("#verified").show("slow");},
    		error: function(jqXHR, textStatus, errorThrown) {jQuery("#problem").show("slow");});
    	});
    	</script> <?php

    I would greatly appreciate any help... thanks!

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 8 months ago by Michael Davis
  • This topic is not resolved
  • WordPress version: 3.2.1