Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dhtml write td event ?

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<td id='sampleCell' ondragenter='dragEnterCell();'>...</td>

how to use DHTML to write this event to a new td cell?

oCell.innerHTML = "...";
oCell.dragenter="dragEnterCell();"; // doesn't work
oCell.ondragenter="dragEnterCell();"; // doesn't work

how to work out ? Thanks.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when you assign event handlers functions you do it like

obj.eventHandler = fnc;

or

obj.eventHandler = function(){fnc();}

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic