Frank Palinkas wrote: > function remove() > { > if (remove) > { > var div = document.getElementById("remove"); > div.parentNode.removeChild(div); > } > else > { > document.getElementById("remove").style.display = "none"; > } > } > Frank,
try this... if (typeof document.removeChild != undefined) { var div = document.getElementById("remove"); div.parentNode.removeChild(div); } else { document.getElementById("remove").style.display = "none"; } if you're doing a lot of checking throughout your code though set a global flag... var DOM = document.getElementById ? true : false; and then... if (DOM) { ... } email me direct if you want to discuss as it's probably off topic by now. -- Chris Knowles ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *******************************************************************