P
Peter
I would like to use code like the following:
this.onclick = function(e)
{
alert("I'm in the onclick handler");
}
But I do not want to wipe out any existing onclick event code. I want to do
this dynamically.
I tried variations like this:
var oc = this.onclick;
this.onclick = function(e)
{
alert("I'm in the onclick handler");
if (oc != null)
eval(oc.toString());
}
but can't get it to work.
Is this sort of thing possible? If so, how is it done?
TIA.
this.onclick = function(e)
{
alert("I'm in the onclick handler");
}
But I do not want to wipe out any existing onclick event code. I want to do
this dynamically.
I tried variations like this:
var oc = this.onclick;
this.onclick = function(e)
{
alert("I'm in the onclick handler");
if (oc != null)
eval(oc.toString());
}
but can't get it to work.
Is this sort of thing possible? If so, how is it done?
TIA.