Recently I’ve been involved with rebuilding a login and registration section on a website. As it currently is both are separate pages that will be loaded when you hit the links. What the bosses liked to see is that the user is not taken away from the content when they have to log in.
The only way to do that is in an AJAX popup. This would then show the registration / login box. Not to fancy you would say, well so did I originally. But the real problem began when forms where on the page loading the login popup. Because I have to reload after submitting the login I lost all information in the form.
The reason for the refresh is adding user specific content. But loosing the information of the form was not the point.
The quick hack
form.submit(). Et voila!
In pseudo code it looks something like:
The beauty of this way is that the user doesn’t even get a warning that they are submitting a form. Which is kinda strange to me, but hay if it works!