Click to See Complete Forum and Search --> : Netscape says Not a Function, IE DOES!
kdorrick
09-24-2003, 01:03 PM
I have a function in a js file that works fine in IE but netscape says my statement:
var tabRow = document.tabTable.insertRow();
is not a function.
The page it displays on is http://www.relpaxchallenge.com/patient/pt_attack.htm
the full function script is posted at:
http://www.relpaxchallenge.com/patient/jsnet.htm
Khalid Ali
09-24-2003, 03:11 PM
Yeah..that is because you are trying to use IE specific function
var tabRow = document.tabTable.insertRow();
you will need to use DOM specific methods to add or remove elements
createElement()
etc...
kdorrick
09-24-2003, 03:26 PM
Khalid,
Could you please give me an example using the insertrow line?
Thanks,
Karen
Khalid Ali
09-24-2003, 03:58 PM
What do you eman?...
as I said insertRow() is only IE specific,it will not work with NS,
If you want to make it work for both browsers use DOM methods..
http://w3c.org
kdorrick
09-25-2003, 10:31 AM
Hey Khalid,
I have fixed the table issue by adding the create element tag, but now get a function error further down the js page...
tabButton.attachEvent('onclick', ShowTab);
I have searched the w3 site with no success on what to do (probably because I am not too sure what to look for).
Thanks,
Karen