doddsey_65 Posted October 16, 2010 Share Posted October 16, 2010 i have some javascript which should show the messages at the side of the input but they arent and i dont know where im going wrong. <script language="javascript"> $(document).ready(function() { $("#fullname").blur(function() { //remove all the class add the messagebox classes and start fading $("#msgbox1").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow"); $.post("update.php",{ fullname:$(this).val() } ,function(data) { if (data==1) { $("#msgbox1").fadeTo(200,0.1,function() //start fading the messagebox { //add message and change the class of the box and start fading $(this).html('Update Successful').addClass('messageboxerror').fadeTo(900,1); }); } else { $("#msgbox1").fadeTo(200,0.1,function() //start fading the messagebox { //add message and change the class of the box and start fading $(this).html('Error Updating').addClass('messageboxerror').fadeTo(900,1); }); } }); }); }); </script> <input class="input2" id="fullname" type="text" name="fullname" value="<?php echo $tab_info->user_real_name; ?>" /> <span id="msgbox1" style="display:none"></span> ive used this before and it worked but not this time. ANyone know why? Link to comment https://forums.phpfreaks.com/topic/215991-update-fields/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.