Jump to content

dynamically change event handlers?


biffyboy

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.