• Post Reply Bookmark Topic Watch Topic
  • New Topic

request.getParameter in IE

 
Chad Clites
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been developing a simple web app, and things have been going quite swimmingly until I tried to run it in IE (I use FireFox), and I hit a small snag.

In Firefox, in the doPost method, button = request.getParameter("button"); returns the value for button.

In IE, the same code returns null. For the life of me, I can't figure out why that should make any difference.. or how to make IE return a valid value. Any ideas?
[ August 25, 2005: Message edited by: C Clites ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the code for the form and "button" widget?
 
Chad Clites
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure..I have a sneaking suspicion that is where the problem is in the first place.



I'm notorious for not closing tags properly, but if that is the case, I'm not seeing it. Thanks for taking a look.
 
Stefan Evans
Bartender
Posts: 1822
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With an input type="image" what it submits is [name].x and [name].y indicating the x,y co-ordinates of where you clicked on the button.

So try request.getParameter("button.x");
This is specified in the HTML Spec.

[edit]
Just reread your message and noticed your original intention.
No you can't use the input type="image" as a switch with different values in IE. No value that IE will submit is useful in telling which button was clicked.
Take a look here: http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html#submit

Cheers,
evnafets
[ August 25, 2005: Message edited by: Stefan Evans ]
 
Chad Clites
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. I redid it to use simple radio buttons instead of using images, but I will keep your tip in mind for future use.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!