I have created a text box dynamically using javascript. Now i want to call a javascript function in the OnChange Event Of that Control is there any way to do the same.?? Here is the code what i tried.

Code:
el[j] = document.createElement('input');
el[j].type = 'file';
el[j].name='work'+j;
el[j].onChange='lookup(this.value)';
//el[j].class='filed';
el[j].className ="field";
I think you must use onchange, not onChange

Attaching Event Handlers in OOP

The simplest way to attach event handlers into your page is to insert them directly as attributes on the HTML tags of the object that will trigger them. To trigger an event handler so attached requires that the particular action that the event handler recognises be performed in relation to the object to which it is attached.

In general event handlers will be attached into a tag using code similar to the following (substituting the appropriate event name and function to run for the code in italics):

Hidden text. Registration and a minimum of 1 post(s) are required.
Note that this is not the best way of attaching event handlers but it is the simplest and most commonly used. When you become more familiar with Javascript you will want to move the event handlers out of your HTML into the external Javascript file along with the rest of your [URL="http://www.javascriptbank.com"]Javascript codes[/URL].

Thanks and share your thoughts.
Jackie