Skip to content Skip to sidebar Skip to footer

Html Page Submission Without Redirection

Is there any method to submit an html form without redirecting from the current page without using ajax?

Solution 1:

you can set a target="" for your form - so you could submit your form to a new tab (target="_blank") or to a small, hidden iframe (target="nameofmyiframe")

Solution 2:

Without using ajax? An iframe. Is it recommended? No. Why can't you use ajax techniques?

Solution 3:

Use any element that relies on external resources.

If file uploading is required

Change the target attribute of the form to the name of some hidden iframe.

If file uploading isn't required

Use any element that pulls its content from an external resource

<imgsrc="server.php?name=JohnDoe" /><linkhref="server.php?name=JohnDoe"rel="stylesheet" /><scriptsrc="server.php?name=JohnDoe"></script>
...

But why can't you use AJAX? Note that it's now possible to upload files with AJAX as well.

Solution 4:

event onSubmit what calling a function which end with return false

Post a Comment for "Html Page Submission Without Redirection"