cshoffie Posted February 18, 2008 Share Posted February 18, 2008 Hey everyone, first post! I hope I can get some help as this seems like a good site to get it from. Anyway on to the question... I'm coding a customer registration system for my business. I'm giving the user the option of having a user name of their choice. I'm primarily using PHP/MySQL, but I think I need a little help from Javascript... if he can do it. Basically what I want to do is have an "Available?" button right next to the user name input field so the customer can click it and check to see if it's already taken or not, but what I want it to do is popup a window with the results using PHP. The only problem is that the only way I know how to transfer a $_GET variable to a PHP script is to obviously have the WHOLE form submitted. I don't want that. Is it possible to just have just the user name input field processed WITHOUT processing the whole form and having all of the other entries the user put into the form disappear upon reload? In a nutshell, I need to get whatever the user inputs into ONLY that field and have it submit the results to another script, without submitting the ENTIRE form. I hope you get what I'm saying.... Thanks! Quote Link to comment Share on other sites More sharing options...
nogray Posted February 18, 2008 Share Posted February 18, 2008 Try something like this <input type="text" name="username" id="username"> <a href="#" onclick="window.open('check_username.php?username='+document.getElementById('username').value, '', 'width=250, height=150'); return false;">Available</a> Quote Link to comment Share on other sites More sharing options...
cshoffie Posted February 19, 2008 Author Share Posted February 19, 2008 Hmm, I'm not sure if it's working. It seems like its not sending the value to the $_GET['username'] var... Quote Link to comment Share on other sites More sharing options...
nogray Posted February 19, 2008 Share Posted February 19, 2008 first make sure you have an id in the input field and it's uniq ( id="username" ), if it's still not working, you can post your code or URL and I can take a quick look Quote Link to comment 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.