kari
05-14-2003, 12:47 PM
Hi,
I want to pass an object(name/value) to java script function
<select name=s1 onChange=populateNames(s1)>
where s1 is object (name)
instead of this ...
function populateNames1() {
var s1val = eval ('window.document.forms[0].s1')
var s1value = s1val.value
alert (s1.value)
................
}
function populateNames2() {
var s2val = eval ('window.document.forms[0].s2')
var s2value = s2val.value
alert (s2.value)
................
}
I want to do it genaric way passing object instead of writing function for each object
How can I pass objects here ?
Please help.
thanks
kari
I want to pass an object(name/value) to java script function
<select name=s1 onChange=populateNames(s1)>
where s1 is object (name)
instead of this ...
function populateNames1() {
var s1val = eval ('window.document.forms[0].s1')
var s1value = s1val.value
alert (s1.value)
................
}
function populateNames2() {
var s2val = eval ('window.document.forms[0].s2')
var s2value = s2val.value
alert (s2.value)
................
}
I want to do it genaric way passing object instead of writing function for each object
How can I pass objects here ?
Please help.
thanks
kari