471,620 Members | 1,207 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,620 software developers and data experts.

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 4128
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 XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.