This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
hi, I have created a jsp page with box1 and box2 with box2 dependent on what is selected in box1. If US is chosen from box1 I want box2 to display a list of all states. i have stored all of the states in a vector but I can't seem to get them to read into box2. Can anyone take a look and see what I am doing wrong? I think it is syntax but not sure. Thanks!
Ernest Friedman-Hill
author and iconoclast
Marshal
Can anyone help me with this? I have tried everything I could think of but still can't seem to read the vector into the select options. Thanks!
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
6
posted
0
How about you show me the code after your server side code has run.
Eric
m brymer
Ranch Hand
Joined: Jan 04, 2005
Posts: 64
posted
0
Hi Eric, Below is the entire code for this jsp page, nothing to fancy...
m brymer
Ranch Hand
Joined: Jan 04, 2005
Posts: 64
posted
0
Okay, I got it to show the options on the screen but not in the right format, is there anyway to format these options in javascript? Here is the new piece of code
the output looks like <option value="AL">Alberta<option value="BC">British Columbia...
m brymer
Ranch Hand
Joined: Jan 04, 2005
Posts: 64
posted
0
Can anyone help me?
m brymer
Ranch Hand
Joined: Jan 04, 2005
Posts: 64
posted
0
okay, I have tried something new but am still not getting the right output can someone take a look? Thanks!
m brymer
Ranch Hand
Joined: Jan 04, 2005
Posts: 64
posted
0
Can anyone help me with this? I have been trying everything for the last few days and can't seem to get this to work. I get close but not the right format...Please
m brymer
Ranch Hand
Joined: Jan 04, 2005
Posts: 64
posted
0
Here is the source code I get, you see that everything is there just not the right format.
<script language="javascript"> function setOptions(o) {
var select2 = document.geo.select2; select2.options.length = 0;
You may keep the values in another JS file from where you can retriev instead of taking it from the same page. This will be helpful if this is to be used in more than one place of your application.