468,765 Members | 1,296 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

INPUT type="image" and Form Elements

If I have an Input of type image, it is not listed in the Forms elements
when walking to DOM using MSHTML.

Is this expected behaviour and how would I get the image input to submit
the form NOT using document.form.submit?

Jul 23 '05 #1
2 4037
On Wed, 6 Oct 2004 11:04:00 -0500, Mr.Clean <mrclean@p&g.com> wrote:
If I have an Input of type image, it is not listed in the Forms elements
when walking to DOM using MSHTML.

Is this expected behaviour and how would I get the image input to submit
the form NOT using document.form.submit?


input type=image does indeed submit the form.

Look through form.elements[] for an element whose name property
matches the name on your <input type=image name="foo">

On the server side, there will be two inputs, named foo.x and foo.y,
for forms submitted by pressing an <input type=image name="foo">.

If there is another image input in the same form,
<input type=image name="bar">, that was not pressed to cause
submission, its name will not appear in the server side. Not sure how
DOM knows which was pressed but you can hack something with onclick
event.

---Bruce Wisentaner
Jul 23 '05 #2
Mr.Clean wrote:
If I have an Input of type image, it is not listed in the Forms
elements when walking to DOM using MSHTML.


What happens when you walk the dom using w3c dom methods?

--
Brian (remove "invalid" to email me)
http://www.tsmchughs.com/
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jawahar Rajan | last post: by
1 post views Thread by zelnugget | last post: by
5 posts views Thread by Mark Woodward | last post: by
3 posts views Thread by =?Utf-8?B?V2lsbA==?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.