/    Sign up×
Community /Pin to ProfileBookmark

Netscape says Not a Function, IE DOES!

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 [url]http://www.relpaxchallenge.com/patient/pt_attack.htm[/url]

the full function script is posted at:
[url]http://www.relpaxchallenge.com/patient/jsnet.htm[/url]

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliSep 24.2003 — Yeah..that is because you are trying to use IE specific function

var tabRow = document.tabTable.[b]insertRow()[/b];

you will need to use DOM specific methods to add or remove elements

createElement()

etc...
Copy linkTweet thisAlerts:
@kdorrickauthorSep 24.2003 — Khalid,

Could you please give me an example using the insertrow line?

Thanks,

Karen
Copy linkTweet thisAlerts:
@Khalid_AliSep 24.2003 — 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
Copy linkTweet thisAlerts:
@kdorrickauthorSep 25.2003 — 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
×

Success!

Help @kdorrick spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...