Hello everyone --
Ran into a bit of a snag this morning. I have a <select> that I need to send the value of to a javascript function and parse out two simple values from.
I've been saddled with designing this site for NS, and this problem occurs in 4.x NS browsers (fine in IE and NS6.x).
Here is the <select>
<select name=period1 onChange="setPeriod(this.value,1);">
<option value=20000>Year 2000</option>
<option value=20001>2000 Q1</option>
<option value=20002>2000 Q2</option>
<option value=20003>2000 Q3</option>
<option value=20004>2000 Q4</option>
<option value=20010>Year 2001</option>
<option value=20011>2001 Q1</option>
<option value=20012>2001 Q2</option>
<option value=20013>2001 Q3</option>
<option value=20014>2001 Q4</option>
<option value=20020>Year 2002</option>
<option value=20021>2002 Q1</option>
</select>
Here's the function:
function setPeriod(val,i){
var str = new String(val);
var y = str.slice(0,4);
var q = str.slice(4,5);
//alert(y+','+q);
alert(val);
}
In NS, the alert message returns 'null' every time in 4.x versions. What can I do to modify this to work w/ this product?
Thanks!
paul
Ran into a bit of a snag this morning. I have a <select> that I need to send the value of to a javascript function and parse out two simple values from.
I've been saddled with designing this site for NS, and this problem occurs in 4.x NS browsers (fine in IE and NS6.x).
Here is the <select>
<select name=period1 onChange="setPeriod(this.value,1);">
<option value=20000>Year 2000</option>
<option value=20001>2000 Q1</option>
<option value=20002>2000 Q2</option>
<option value=20003>2000 Q3</option>
<option value=20004>2000 Q4</option>
<option value=20010>Year 2001</option>
<option value=20011>2001 Q1</option>
<option value=20012>2001 Q2</option>
<option value=20013>2001 Q3</option>
<option value=20014>2001 Q4</option>
<option value=20020>Year 2002</option>
<option value=20021>2002 Q1</option>
</select>
Here's the function:
function setPeriod(val,i){
var str = new String(val);
var y = str.slice(0,4);
var q = str.slice(4,5);
//alert(y+','+q);
alert(val);
}
In NS, the alert message returns 'null' every time in 4.x versions. What can I do to modify this to work w/ this product?
Thanks!
paul