Hi All,

I would be obliged if someone helps me in this.

I am dynamically creating rows in my jsp by using the dom-tree functions

To create a text field i use :-

document.createElement("<input name='type"+indexVal+"' type='text'
size='3' maxlength='3' ondblClick='alert(this.value)'>");

The above code works fine and on double clicking, the the alert is invoked.

Now to create a text area using dom i use the following code :-

var td5 =       document.createElement("textarea");
                td5.setAttribute("name","mytextarea");
                td5.setAttribute("cols","10");
                td5.setAttribute("rows","2");
                td5.setAttribute("wrap","PHYSICAL");

Now i wish to add a javascript event to this text area and so i tried the
following
                td5.setAttribute("ondblClick=alert('hello')");

But this does not work. Can anyone please tell me how to add javascript
events to a text area that is generated like this.

Thanking in advance,
Vijay



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to