Hi Simon, As I had faced this issue some times back and the conclusion is that the struts <html:text> is not supported by DOM.
You can use simple HTML's text instead of it. Not sure if this bug has been fixed. Thanks, Amit -----Original Message----- From: Simon Chung [mailto:[EMAIL PROTECTED] Sent: Monday, October 16, 2006 12:59 PM To: dev@struts.apache.org Subject: Struts and DOM2 question. Hi guys, I am trying out on how to dynamically add a struts HTML tag to a HTML page by using javascript. I manage to get it running with normal HTML but I am having some difficulties in using struts. Below are my code in HTML (it spawn a new textbox for me): function addContact(){ var table = document.getElementById('contacts'); var tr = document.createElement('TR'); var td = document.createElement('TD'); var inp = document.createElement('input'); inp.setAttribute('name', 'inp_name'); table.appendChild(tr); tr.appendChild(td); td.appendChild(inp); } But when I try to do the following using struts tag, it doesn't work(it doesn't spawn a new textbox for me). function addContact(){ var table = document.getElementById('contacts'); var tr = document.createElement('TR'); var td = document.createElement('TD'); var inp = document.createElement('html:text'); inp.setAttribute('property', 'inp_name'); table.appendChild(tr); tr.appendChild(td); td.appendChild(inp); } Anyone who had done this or have any idea on how to get around this? Thanks in advance for the help. Cheers, Simon. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]