i want to Call a Div tag in validating a form.....that means i need a div call at the onblur condition....in that time i want to recieve a msg like this username is already exits....like that
I'd use ajax to give this info before the form was sent. That is onblur - check the db and place message in empty div. The prototype Ajax.Updater method is tailor-made for this.
pls help me in case of onblur condition..can we call a Div TAG under the username button?with out using Ajax....
Standard pHp and js: have onblur event submit the form to your form handler script, it checks the entry vs. your db and returns a msg to the form page (OK or Not). This is very heavy on resources because your WHOLE page needs to be reloaded and usually the whole form data will be processed, so it could be awkward to separate a simple name query (onblur) from a "proper" submission (submit button).
The Ajax version:
onblur will call a js script to send and retrieve data from a very simple php file that can access your db. This is relatively painless and easy to isolate from a "proper" submit button action. If you're concerned about the complexity of Ajax - don't be. The prototype library (http://www.prototypejs.org) takes care of the ajax objects. Nice and simple.