no new page when submitting form

A

Armin

Hi!

does anyone know how to submit a form without reloading the page the form
was sent from?

is there something like <form target="_none"> that calls the action (somehow
in the "background") of the form but does not open a new window and leaves
the current one unchanged?

Thanks!
 
A

Andrew Urquhart

*Armin* said:
does anyone know how to submit a form without reloading the page the
form was sent from?

is there something like <form target="_none"> that calls the action
(somehow in the "background") of the form but does not open a new
window and leaves the current one unchanged?

Instruct the server to return a HTTP 204 upon receipt of the submission.
Alternatively use client-side scripting and an XMLHTTP-like interface or
hack the Image() object to pass data via a querystring. The 204 is the
preferred option since client-side script may or may not be
enabled/supported. All methods probably suck for usability.
--
Andrew Urquhart
- FAQ: www.html-faq.com
- Archive: www.google.com/groups?q=alt.html
- Contact me: http://andrewu.co.uk/contact/
- Apologies for the wrong timestamp on my post - blame my ISP
 
J

Jukka K. Korpela

Armin said:
does anyone know how to submit a form without reloading the page the
form was sent from?

As Andrew Urquhart replied, sending back the 204 No Content response at
the HTTP level is the right approach. But...
is there something like <form target="_none"> that calls the action
(somehow in the "background") of the form but does not open a new
window and leaves the current one unchanged?

.... please note that target="_none" violates HTML specifications, which
even say that browsers should ignore such attribute settings. There is a
small, predefined set of target names beginning with "_", such as
"_blank", and "_none" is not among them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top