Biberwerke
Biberwerke

Reputation: 133

Dialog box after form submit

I searched all day for the right answer on stackoverflow, also I couldn't find something helping me out.

Having a simple form like this:

<form action="process.php" method="post">
    <input type="text" name="email">
    <input type="password" name="password" id="password">
    <button value="Login" type="submit" name="submit" onclick="formhash(this.form, this.form.password);"></button>
</form>

currently: Submitting the form redirects to process.php showing a success message & redirecting to another page after some time.

What I need: instead of redirecting to process.php a modal dialog box should open doing the work and showing a success message, closing the dialog box after some time and then doing a refresh of the actual side.

Any help is welcome!

Upvotes: 1

Views: 2639

Answers (2)

blapsley
blapsley

Reputation: 132

This might be what you are looking for:

Message Box opens then disappears

There is also a similar question here on stackoverflow: Link

Upvotes: 0

Kamil
Kamil

Reputation: 1641

Use ajax submit, JQuery already supports this. Try JQuery API http://api.jquery.com/ especially http://api.jquery.com/category/ajax/ Examples are provided on that site too.

Upvotes: 2

Related Questions