russ801
03-13-2003, 01:48 PM
I am returing a parameter to a function during a mouse over. the function works fine but I want to save the parameter value as a variable.
How do I do it?
How do I do it?
|
Click to See Complete Forum and Search --> : saving a parameter russ801 03-13-2003, 01:48 PM I am returing a parameter to a function during a mouse over. the function works fine but I want to save the parameter value as a variable. How do I do it? requestcode 03-13-2003, 01:51 PM Can you post the function you are using? It would help to see it. AdamBrill 03-13-2003, 01:57 PM I think what you want is a global variable, right? If so, then you must declare it outside of the function. Like this: var saveme; function mouse_over(TheVar){ saveme=TheVar; } I think that will do what you wanted. :) pyro 03-13-2003, 01:57 PM I'm assuming you're doing it something like this... function mover(var) { //code } ------ onmouseover="mover('somevalue'); Is that correct? if so, in your function just go... function mover(var) { somenewvar = var; //code } This will throw the value of var into the somenewvar variable. russ801 03-13-2003, 02:51 PM that was the fiirst thing I tried, but I am getting a little too fancy for my own good. Tried following on the debugger instead of placing a simple alert() to track it. And then didn't set the break point right. Thansk for the help webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |