Click to See Complete Forum and Search --> : finding next value in <select>


awebb
06-27-2003, 05:49 AM
I have a variable which is making an array out of the <option> string in a <select>.
it is:var selectedMonthArray=selection.split(','); (it works fine)
Is it possible to make another array out of the next element in the <select>, ie one that has not been selected but is the next one in the list?
I've tried var selectedMonthArray2=selection+1.split(','); with no result (don't laugh too loud).
Any ideas?

awebb
06-27-2003, 06:56 AM
I'm using this function to select the first variable (? I hope you know what I mean)
findMonth(this.options[this.selectedIndex].value, this.form)
Is this what I should be using or should I be using something along the lines of:
if (var selectedMonthArray=selection.split(',')) {

awebb
06-27-2003, 06:59 AM
I'm using this function to select the first variable (? I hope you know what I mean)
findMonth(this.options[this.selectedIndex].value, this.form)
Is this what I should be using or should I be using something along the lines of:
if (var selectedMonthArray=selection.split(',')) {
var newVar=findMonth(this.options[this.selectedIndex+1].value, this.form);
}

Sorry about the last post...hit the submit button too soon.

awebb
06-27-2003, 07:09 AM
Thanks, I'll try and beat something into shape.
Andy