biffyboy Posted June 29, 2007 Share Posted June 29, 2007 Hi I am writing a script in which a form is generated based on existing content in the form. Basically I want to add a new row if the last one is filled out. function createTextBox(obj) { var textBox = document.createElement("input"); textBox.type = "text"; textBox.name = "textBox"; textBox.id = "textBox"; textBox.onBlur = 'checkNewRow(this)'; obj.appendChild(textBox); } I want to set the function it calls, but I dont know how to do that biffy Link to comment https://forums.phpfreaks.com/topic/57768-dynamically-change-event-handlers/ Share on other sites More sharing options...
emehrkay Posted June 30, 2007 Share Posted June 30, 2007 Im surprised that youve gotten this far and need help. I would assume that after y ou append the element, it is added to the dom. then you should be albe to reference it by id adding event handlers as needed Link to comment https://forums.phpfreaks.com/topic/57768-dynamically-change-event-handlers/#findComment-286691 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.