Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > image input field not sending value to servlet request object

Reply
Thread Tools

image input field not sending value to servlet request object

 
 
efiedler
Guest
Posts: n/a
 
      06-27-2003
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.
 
Reply With Quote
 
 
 
 
Tim Slattery
Guest
Posts: n/a
 
      06-27-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (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
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript validation for a not required field, field is onlyrequired if another field has a value jr Javascript 3 07-08-2010 10:33 AM
1.Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed" Sound Javascript 2 09-28-2006 02:43 PM
Getting servlet context path without a servlet request. stuart.j.wood@gmail.com Java 3 06-06-2006 06:38 AM
Servlet question(Tomcat, web.xml, servlet-class, servlet-name) circuit_breaker Java 2 04-04-2004 03:26 AM
Request.Form("Field Name") Versus Request.QueryString("Field Name") John Davis ASP General 2 08-18-2003 05:00 AM



Advertisments