You are here: irt.org | About | Feedback | 1879 [ previous next ]
Feedback on:
irt.org FAQ Knowledge Base Q879
Sent by
Maurice Lynch on October 18, 2000 at 10:00:10:
Worth:
Very worth reading
Comments:
Thanks for the code for cloning objects however when trying to copy a Form object in IE5.5 I get a "class not registered" error. Any ideas?
<html>
<head>
<script language="JavaScript">
function cloneObject(what) {
for (i in what) {
this[i] = what[i];
}
}
function copyForm() {
myform = new cloneObject(document.forms[0]);
alert(myform.elements[0].value);
}
</script>
</head>
<body>
<form>
<input type="text" value = "Hello">
<input type="button" value="Copy Form" onClick="copyForm()";>
</form>
</body>
</html>
Other feedback on 'irt.org FAQ Knowledge Base Q879' - show all