• Post Reply Bookmark Topic Watch Topic
  • New Topic

request.getParameter

 
Neeraj Vij
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a list box...

country :<select name="country" style="width: 145px;">
<option value="belgium">belgium </option>
<option value="czech republic">czech republic </option>
</select>

when i select belgium, request.getParameter("country")gives me the value "belgium" but when i select czech republic request.getParameter("country") gives me the value "czech"

i am unable to figure it out why this is happening.. Pls. provide some inputs why it could be behaving like this ....which it should not.

Thanks
Neeraj.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the code you posted actually reflect the actual code? I suspect not.
 
Neeraj Vij
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no this is not the actual code.. country names and their values are generated dynamically. these are values which I checked in the the source of the page.

Thanks,
Neeraj.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Neeraj Vij:
Hi,

I have a list box...

country :<select name="country" style="width: 145px;">
<option value="belgium">belgium </option>
<option value="czech republic">czech republic </option>
</select>

when i select belgium, request.getParameter("country")gives me the value "belgium" but when i select czech republic request.getParameter("country") gives me the value "czech"

i am unable to figure it out why this is happening.. Pls. provide some inputs why it could be behaving like this ....which it should not.

Thanks
Neeraj.


What you are expecting???
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Neeraj Vij:
no this is not the actual code.. country names and their values are generated dynamically. these are values which I checked in the the source of the page.

Thanks,
Neeraj.


And...
Did you type it into this page or did you cut and paste it?
 
Neeraj Vij
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was expecting the value "czech republic". I copied some of the text from the source of the jsp page. Please let me know if I have done something wrong. I will try not repeat that mistake.

Thanks,
Neeraj.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do a View Source from the browser, then cut and paste the HTML of the select element. I suspect you have a quoting issue.
 
Neeraj Vij
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your inputs.will check it and will inform about it asap.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!