realcoder Posted December 24, 2010 Share Posted December 24, 2010 hii as i see some code in which we can sent data on the run time when we enter something in input & go for next that post that data into action forum which we define in Ajax action that is for the checking for username field on run time wihtout loading the page here is code <SCRIPT type="text/javascript"> <!-- pic1 = new Image(16, 16); pic1.src = "images/loader.gif"; $(document).ready(function(){ $("#username").change(function() { var usr = $("#username").val(); if(usr.length >= 4) { $("#status").html('<img src="images/loader.gif" align="absmiddle"> Checking availability...'); $.ajax({ type: "POST", url: "userchk.php", data: "username="+ usr, success: function(msg){ $("#status").ajaxComplete(function(event, request, settings){ if(msg == 'OK') { $("#username").removeClass('object_error'); // if necessary $("#username").addClass("object_ok"); $(this).html(' <img src="images/tick.gif" align="absmiddle">'); } else { $("#username").removeClass('object_ok'); // if necessary $("#username").addClass("object_error"); $(this).html(msg); } }); } }); } else { $("#status").html('<font color="red"> username have at least <strong>4</strong> characters.</font>'); $("#username").removeClass('object_ok'); // if necessary $("#username").addClass("object_error"); } }); }); //--> </SCRIPT> and here we give id in forum input field <input id="username" name="username" type="text" value=""/> Simple i want that i can get values of more input field at the same time when user enter data in those how i'll get that Quote Link to comment https://forums.phpfreaks.com/topic/222593-how-to-get-values-without-page-upload/ Share on other sites More sharing options...
realcoder Posted December 24, 2010 Author Share Posted December 24, 2010 mean i can get the values of multiple when we enter values at run time Quote Link to comment https://forums.phpfreaks.com/topic/222593-how-to-get-values-without-page-upload/#findComment-1151169 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.