• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

request.getParameter in IE

 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic