hey guys,
I have a function that does some stuff and is fired on a onclick event.
There are 38 of these onclick events and I need to pass the name of one of 38 gobal varaibles to the function to be used there.
If i do...
var1 = "test"
onclick="functionname(var1)"
to call the function and in the function...
function functionname(q)
alert(q)
it displays "var1" not "test"
Anyone got any ideas how to pass this varaible name to the function and not as a string??
Cheers in advance guys
I have a function that does some stuff and is fired on a onclick event.
There are 38 of these onclick events and I need to pass the name of one of 38 gobal varaibles to the function to be used there.
If i do...
var1 = "test"
onclick="functionname(var1)"
to call the function and in the function...
function functionname(q)
alert(q)
it displays "var1" not "test"
Anyone got any ideas how to pass this varaible name to the function and not as a string??
Cheers in advance guys
