开发者

jQuery/JavaScript: How can i do this two-smart-page sign up model

Please check this site, while I am explaining:

http://www.dkbn.dk/

Now this is the part of the site that i want to make something alike:

jQuery/JavaScript: How can i do this two-smart-page sign up model

This is a signup form. Now they have spliced the form up in a cool way, I mean if you try to fill something in the fields and press "Fo开发者_运维问答rtsæt" (Next in English) then without updating the page, the signup form changes to new fields "Password, birthday, Country" and then the button changes to "Log in".

How have they done that? I suspect they have used jQuery? How should I do this, if I want to do something like this? Please show me with examples as am still learner in jQuery. Thank you.


They use jQuery to submit the first form with Ajax, then they publish (if succeeded) the new form elements into the front end, this is done by putting the output in the div where now the loginform is stored. The output comes from the back end script (called by Ajax). Meanwhile the full name and email are stored in sessions. When an user submit the second form the session + new data is collected by a new back end script, which probably pushes everything into a database and give an output succeeded.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜