471,122 Members | 1,126 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

image input field not sending value to servlet request object

Hi - I have the following input field on my html page:

<input type="image" name="submit" id="submit" src="c:\image.jpg"
value="image.jpg">
I also have another input field on the form that is a text box. When
submitted my form posts its data to a servlet. I can click on the
image, and the form is posted and the servlet is ran. However, I was
stepping through the debuger of the servlet and I noticed the request
object sent from the form did not have the value of the image field in
it. It did have the value of the text field I mentioned, and that is
it.

In the servelt I run (this is more or less pseudecode below)

Enumeration enumRequest = Request.GetParameterNames()
While enumRequest.hasmoreelements(){
string strParam = (String)enumRequest.nextelement()
string strParamValue = (String)request.getparameter(strParam)
}

The only parameter returned to me is the value in the text
field....Why am I not receviing the value of the image field i.e.
"image.jpg"

Thanks.
Jul 20 '05 #1
1 5741
ef******@actelesys.com (efiedler) wrote:
Hi - I have the following input field on my html page:

<input type="image" name="submit" id="submit" src="c:\image.jpg"
value="image.jpg">
I also have another input field on the form that is a text box. When
submitted my form posts its data to a servlet. I can click on the
image, and the form is posted and the servlet is ran. However, I was
stepping through the debuger of the servlet and I noticed the request
object sent from the form did not have the value of the image field in
it. It did have the value of the text field I mentioned, and that is
it.


According to the reference I'm looking at, there is no "value"
property for the <input type="image"...> tag.

--
Tim Slattery
Sl********@bls.gov
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by dave | last post: by
1 post views Thread by G | 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.