Liquid Fire Posted June 18, 2007 Share Posted June 18, 2007 I don't know if this is the right place but i can't imagine I can do what i want without AJAX/Javascript. Basically I have a form a user uses to insert some data to a database. I want to make sure everything is correct and everything is inserted that needs to be and everything that needs to be unique is unique from the database. The one way i can imagine doing this is to using ajax everytime something in any of the form fields change and when everything is complete and unique, I will display a active submit button and if not i will display a submit button button an inactive one however one of them is a textarea and I am not sure it that is the best method since people can type fast and ajax maybe be a bit to slow. Is their a faster method for doing this without having to have the user fill in information submit and then i check it and tell the username any errors they made? Link to comment https://forums.phpfreaks.com/topic/56041-validating-a-xhtml-form/ Share on other sites More sharing options...
Liquid Fire Posted June 19, 2007 Author Share Posted June 19, 2007 Anyone? Link to comment https://forums.phpfreaks.com/topic/56041-validating-a-xhtml-form/#findComment-277754 Share on other sites More sharing options...
nogray Posted June 19, 2007 Share Posted June 19, 2007 you can add a "Check if unique" link next to the field, so when they finish typing, they can click on that and a small pop-up (or ajax) will check if the username is unique. Also, you can submit the form to a hidden iframe that will either process the form and than redirect the parent window, or will print out a javascript alert with the errors (this way they don't leave the form after they submit unless it's valid). Link to comment https://forums.phpfreaks.com/topic/56041-validating-a-xhtml-form/#findComment-277825 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.