I'm adding a row dynamically using JS.That row will contain a checkbox and hyperlink. I'm able to get this done.But when i do a document.forms.checkboxname.checked i'm getting an error,It says it's undefined.
with this code i'm able to add a row.
But I also want to use the checkbox, is it possible to use it?
I'm doing a document.forms.chk it says it's undefined..
Is it not possible to use a dynamically added checkbox,I thought the DOM tree would in the browser's memory and it's possible to use the checkbox. [ August 09, 2007: Message edited by: Srikkanth Mohanasundaram ]
I'm not sure why it's not working for you, but before you spend a whole lot more time on this, be aware that using refereces like document.forms is very old-fashioned and error prone. (What if a new form gets added to the page before this form? Your code is broken!)
What I tend to do is to assign id values to elements that I need to reference and use document.getElementById() to directly and unequivically reference the element.