AW: AW: [Javascript] Re: one form, two submit ways
Michael Borchers
borchers at tridem.de
Thu Mar 3 07:34:13 CST 2005
> -----Ursprüngliche Nachricht-----
> Von: Kim Hoogenberg [mailto:kim.hoogenberg at virgil.nl]
> Gesendet: Donnerstag, 3. März 2005 14:18
> An: [JavaScript List]
> Betreff: Re: AW: [Javascript] Re: one form, two submit ways
>
>
> why don't you just use something like:
>
> <input type="button" name="book" value="Book!"
> onclick="document.forms['bookForm'].submit()">
> <input type="button" name="print" value="Print!"
> onclick="document.forms
> ['printForm'].submit()">
>
> Or
>
> <input type="hidden" name="subaction" value="">
> <input type="button" name="book" value="Book!"
> onclick="document.forms['form'].subaction.value='book';document.forms
> ['form'].submit()">
> <input type="button" name="print" value="Print!"
> onclick="document.forms
> ['form'].subaction.value='print';document.forms['form'].submit()">
>
> Hope this helps.
>
> Greetz,
>
> Kim
works very fine, thanks.
so, i guess using "action" as a name for a hidden field is quite commen, isn't it?
but still, is it a little bit "dirty", because the form name already has an "action" tag?
More information about the Javascript
mailing list