I am generating a HTML code through AJAX, and setting that HTML into a DIV and the DIV is inside a form. Now the form does not include an element which is being generated through AJAX. But whenever i access that element using ...
[code=javascript]
document.getEle mentsByName('el ement_name').le ngth //it returns some value.
[/code]
But whenever i trying to access that element using ...
[code=javascript]
document.forms['form_name'].elements['element_name'] //it returns undefined.
[/code]
This is not working in Mozilla but in IE working. What could be the problem, please help me out !!
[code=javascript]
document.getEle mentsByName('el ement_name').le ngth //it returns some value.
[/code]
But whenever i trying to access that element using ...
[code=javascript]
document.forms['form_name'].elements['element_name'] //it returns undefined.
[/code]
This is not working in Mozilla but in IE working. What could be the problem, please help me out !!
Comment