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"
    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.
    efiedler, Jun 27, 2003
    #1
    1. Advertising

  2. efiedler

    Tim Slattery Guest

    (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
    Tim Slattery, Jun 27, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. circuit_breaker
    Replies:
    2
    Views:
    1,993
    Jack Jia
    Apr 4, 2004
  2. Replies:
    3
    Views:
    29,091
    Stuart Wood
    Jun 6, 2006
  3. John Davis
    Replies:
    2
    Views:
    382
    Dave Anderson
    Aug 18, 2003
  4. Sound
    Replies:
    2
    Views:
    436
    Randy Webb
    Sep 28, 2006
  5. jr
    Replies:
    3
    Views:
    414
Loading...

Share This Page