Jump to content

Archived

This topic is now archived and is closed to further replies.

robcrozier

Form autorefresh help

Recommended Posts

Ok, what I’m trying to do is prompt a user for some input from a form, I then want this input to be validated and if the data entered is valid, I want another form to automatically be displayed below this one.  I've seen it done loads of times and when I’ve used them in the past on other websites, the whole page does not seem to refresh - the new form or form field just appears.

Can someone shed some light on this for me, does the whole page need refreshing (I can manage if this is the case).  Or is there another way of doing it.

Cheers!

Share this post


Link to post
Share on other sites
one word: [b]AJAX[/b]. what is happening is that when the focus goes OFF of a field, there is an HTTP request made that validates that field. once it is confirmed that all the fields are valid, the javascript that has been performing the HTTP requests simply tacks on the additional fields or form to the end of the page. sounds simple in my explanation, but there is definitely a lot to it.

Share this post


Link to post
Share on other sites
It's just another way of having a child process of the current window go round-trip to the server.  AJAX is just the fanciest, new-fangled way.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.