0

Hi Folks,

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.

el[j] = document.createElement('input');
el[j].type = 'text';
el[j].name='work'+j;
el[j].onChange='lookup(this.value)';
//el[j].class='filed';
el[j].className ="field";

In this I written the Onchange Event but its not effecting please try for the same..

3
Contributors
4
Replies
6
Views
8 Years
Discussion Span
Last Post by jithusdani
0

I think you must use onchange, not onChange

More explains at

Edited by Ezzaral: Removed url. This isn't the place to drum up traffic for your site.

0

hi everybody,
I got the solution for the same... here is the code to do the same..

el[j].onchange=function(){lookup(this);};

This is how we can call a javascript function in dynamic created textbox using javascript.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.