codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Form problem using type="image" with Internet Explorer  bra at 23:38 on Friday, December 17, 2004
 

I have this piece of code:

<FORM target="right" method="post">
<INPUT type="submit"
name="button1"
value="<%=rs("Fnavn")%>"
onclick="this.form.action = '/forum/page1.html';"
border="0"
style="width: 200; text-align:left" >
<INPUT type="image"
src="effekter\slet_ret.bmp"
name="button2"
value="<%=rs("Fnavn")%>"
onclick="this.form.action = '/forum/page2.html';"
border="0"
(The inserted value is from a DB file)

Request.Form("button1") in Page1.asp shows data send correct.
Request.Form("button2") in Page2.asp shows no data send!.
Same code processed from Mozilla 1.0 work with data send correct to both pages.

Can anybody give me a hint?

Regards,
Bo/Denmark

(Running WindowsXP, SP2 (6.0.2900.2180) and Mozilla Firefox 1.0


  Re: Form problem using type=  tgreer at 01:57 on Saturday, December 18, 2004
 

The input type of image is meant to act as an image map. It generates an x and y coordinate. It isn't meant to act as a button. You can use ordinary <img> tags for that. Also, I don't see that you're actually submitting the form, but maybe that part isn't included in your code snippet.



<Added>

Where in Denmark? I live in the U.S., but recently spent time in Silkeborg on a job for Jyske Bank. I had a fantastic time, what a beautiful place.


  Re: Form problem using type=  bra at 10:26 on Saturday, December 18, 2004
 

tgreer pinpoited the problem.
I found the MSDN confirmation on the problem (this link:)

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/objects/input_image.asp

MS states:

Remarks
The x-coordinate is submitted under the name of the control with .x appended, and the y-coordinate is submitted under the name of the control with .y appended. Any value property is ignored. The src property specifies the IMG element.


My comment:
I have seen many samples where programmers have replaced the type="SUBMIT" with a type="IMAGE", assuming data is send to the ASP page.
Funny thing is that Mozilla receives the data, IE does not.

<added>
tgreer:
I work for that Bank! I live in Silkeborg. Have send you a mail with details.



  Re: Form problem using type=  tgreer at 03:26 on Sunday, December 19, 2004
 

We may have met! I haven't received your email yet, I'm looking forward to getting it. You can get my email from my website.

Thomas D. Greer
www.tgreer.com









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Help on this program
•  Compiler Error Message: CS0246: The type or namespace name `Acme` could not be found (are you missing a using directive or an assembly reference?)
•  Re: A few beginner questions (compiler recs, resources, etc)
•  Re: how to aggregate the hourly
•  bandwith monitor
•  Re: stripping characters from variable
•  Auto populating dates in form to Database
•  Re: Overflow: Scroll - Back to Top
•  Re: C++ Beginner question


Recent Articles
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net
Creating CSS Buttons


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005