Tech Journal Back to Tech Journal

Is there some way for me to set the onclick event dynamically using JavaScript's mouseover event?

Update onclick dynamically:

onmouseover="
if (this.onclick != null && this.onclick.toString != null) {
  var s=this.onclick.toString(),
      q=s.indexOf(String.fromCharCode(34) + ',')!=-1 ? String.fromCharCode(34) : String.fromCharCode(39);
  var p=s.indexOf('.php'+q);
  if(p!=-1){
     eval('this.onclick=' + s.substring(0,p+4) + '?customize=1' + q + s.substr(p+5));
  }
}"
Last updated on 2008-01-01 05:51:08 -0700, by Shalom Craimer

Back to Tech Journal