push button ??

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I found a use for a (push) button the other day - having never wanted it
before. I used button rather than input type=button, because I wanted to
use an image for it.

The html4 spec doesn't say anything explicit, though, about how/whether
it gets submitted with the other 'successful controls'.

In practice, using push buttons within a form, with name and value
attributes, and some content (an image):
Firefox doesn't submit it.
ie6 submits the content (the html image tag), not the value.

I was kind of hoping for the value, since I went to some trouble to set
it within the javascript.

Given that it doesn't seem to do what I want, or anything consistent, in
the popular browsers, I'll find another way of doing it at this point.

However, I did wonder if anyone could clarify the 'correct' behaviour,
whether any browsers implement it, and whether this is a known bug.


Re: push button ??

Chris Sharman wrote:
Quoted text here. Click to load it

Well, if it is <button type="submit"> then it should.

Quoted text here. Click to load it

Yes, this is a known bug in IE and the reason the <button> element in
uncommon on the WWW.

Re: push button ??

Quoted text here. Click to load it

I'll sometimes use a text box styled to look like a pushbutton, with
a link in it.  Either that or an <input type=submit > button.


Site Timeline