image input field not sending value to servlet request object

Discussion in 'Javascript' started by efiedler, Jun 27, 2003.

  1. efiedler

    efiedler Guest

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

    <input type="image" name="submit" id="submit" src="c:\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

    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.

    efiedler, Jun 27, 2003
    1. Advertisements

  2. efiedler

    Tim Slattery Guest

    According to the reference I'm looking at, there is no "value"
    property for the <input type="image"...> tag.
    Tim Slattery, Jun 27, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.