|
Posted by Andy Dingley on 11/25/08 11:51
Alexander Weiner wrote:
> It is absolutely necessary, that all the parameters are send by post and not
> by get.
Then you _must_ submit from a <form>, not an <a> link (OK, so you
could do some AJAX-like thing too)
You have three options: CSS, JavaScript or a lot of JavaScript.
For CSS you make a bog-standard <form> with a submit button on it, then
you use CSS to make it look as much like an <a> as possible. This is
the simplest and most robust.
For JavaScript then you code a HTML <a> as normal, code a <form> as
well, then you use JavaScript to trap the <a onclick=... > event and
use it to do a form submit instead. jojo had the right idea, but coded
it unworkably badly. Return false afterwards, or else the <a> will
still try and navigate somewhere. What to set the <a href=... >
attribute to depends on what you wnat to happen for non-JS users. If
you want them to be disabled safely, then use href="#". If you permit
them to submit via a GET, but at least have something still working,
then set this link in the href as normal. Returning false will guard
against double submissions.
With a whole bunch of JavaScript and AJAX, you can do it without the
extra HTML coding.
Navigation:
[Reply to this message]
|