[whatwg] Targetting different anchors after submitting the form
ROBO Design
robodesign at gmail.com
Mon Mar 6 08:20:59 PST 2006
Le Mon, 06 Mar 2006 18:11:11 +0200, Ric Hardacre <whatwg at cycloid.f9.co.uk>
a écrit:
<...>
> <form action="order_place.asp">
> <input type="submit" value="PLACE ORDER">
> <input type="submit" value="SAVE QUOTE" action="quote_add.asp#thanks">
> <input type="submit" value="RECALCULATE TOTALS" action="#here">
> </form>
>
> where
>
> the first button invokes the default form action (user hands over their
> cash)
>
> the second overrides it with it's own target page (converting the user's
> basket into a quote that they can refer to later and place as an order)
>
> the third submits the page back to itself (as per action="") but
> specifies an anchor to jump to (e.g. if the basket and totaliser is at
> the foot of the page)
At first glance I did think the third submits as if
action="order_place.asp#here". But based on the other examples you've
provided, maybe it's proper to have it like you said.
> as an aside, if i could go back in time i would change the original spec
> so that the text displayed on a submit button is separate from the value
> submitted, thus:
>
> <input type="submit" name="ordertype" value="sales" text="PLACE SALES
> ORDER">
> <input type="submit" name="ordertype" value="sample" text="PLACE SAMPLE
> ORDER">
> <input type="submit" name="ordertype" value="pro" text="REQUEST PRO RATA
> INVOICE">
I did think of this quite many times.
The example you've provided is not on my taste.
<input type="submit" name="ordertype" value="sample">
PLACE SAMPLE ORDER
</input>
Allowed child element: only a text node. Another example, maybe too
"verbose", would be:
<label>
<input type="submit" name="ordertype" value="sample">
PLACE SAMPLE ORDER
</label>
This would be consistent with the other inputs (label for input type
checkbox|radio|text|password|whatever).
What do you think?
--
http://www.robodesign.ro
ROBO Design - We bring you the future
More information about the whatwg
mailing list