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 = 'file';
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..

Edited by jithusdani: n/a

4
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by somedude3488
0

In order for the event to be triggered, the action must occur, this will only happen when on the page where this textbox is, you change the the value of the textbox

0

I think you must use onchange, not onChange

More explains at [removed]

Edited by Ezzaral: Removed url. Do not promote your site here.

0

no if we using onchange it will not working.. any other suggestion..?

0

You should post this in javascript forum.

Anyway, you can't use 'this' in dynamically. The only way I have found that works is if you attach an event and use the target part of the trigger event to get the value you are wanting.

This topic has been dead for over six months. 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.