File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Clone Node Problems in IE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Clone Node Problems in IE" Watch "Clone Node Problems in IE" New topic
Author

Clone Node Problems in IE

Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
Hi,

I am cloning an Select Box which has an Onchange function associated with it. This function takes an input parameter - id. It clones sucessfully, but onChange function is not working for the Cloned node. The same script works in FireFox but not in IE. I am trying to fix this problem for more 1 day. But couldn't. Can you provide some suggesstions to fix this issue. I am attaching test to simulate the problem. Thanks in Advance.



Regards,
Arul.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
change

clonedNode.setAttribute("onchange","alert(this.id)");

to

clonedNode.onchange = function(){alert(this.id); };

Eric
Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
Thanks a lot. That worked out.

Regards,
Arul.
 
 
subject: Clone Node Problems in IE