D
David
Can some sort of is else condition be used for the following to change the
onclick to onmouseover depending on an argument in the surrounding function?
All of the code in the .. code to execute ... is very long and exactly
the same for both onclick or onmouseover events. Otherwise I would just make
2 functions.
function doIt(argument){
element.onclick = function {
.. code to execute ...
};
}
-------------------------------------
Laymens terms, like this..
function doIt(argument){
if(argument == 1){
element.onclick = function {
}else{
element.onmouseover = function {
}
.. code to execute ...
};
}
David
onclick to onmouseover depending on an argument in the surrounding function?
All of the code in the .. code to execute ... is very long and exactly
the same for both onclick or onmouseover events. Otherwise I would just make
2 functions.
function doIt(argument){
element.onclick = function {
.. code to execute ...
};
}
-------------------------------------
Laymens terms, like this..
function doIt(argument){
if(argument == 1){
element.onclick = function {
}else{
element.onmouseover = function {
}
.. code to execute ...
};
}
David