/    Sign up×
Community /Pin to ProfileBookmark

my browser detect script hangs page

Hi, I built a site for a client, [url]http://www.somersetorganics.co.uk/erol/erol.html[/url], which works perfectly on all browsers, except I have a bit of javascript in the menu which chooses a style sheet depending on whether its netscape or ie, which works perfectly in ie all versions and netscape 4.79, but the page will not load in netscape 6 or 7, is it conflicting with some other script? any help would be greatly appreciated.
thanks

felix corke

?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisNov 22.2002 — Please post the script that you are talking about so we don't have to weed through your whole page.
Copy linkTweet thisAlerts:
@CharlesNov 22.2002 — And your browser detect makes the page not work at all on my browser, Opera 6.05. I would suggest that you make your site work for people who eschew JavaScript quickly and before your client finds out .
Copy linkTweet thisAlerts:
@felixcorkeauthorNov 22.2002 — yeah, i know its a nightmare, its half generated by a store-building software app, i put in this code: if (navigator.appName == "Netscape") {

document.write('<LINK REL="StyleSheet" HREF="http://www.somersetorganics.co.uk/Netscapesomersetorganicsstylee.css" TYPE="text/css">');

} else{

document.write('<LINK REL="StyleSheet" HREF="http://www.somersetorganics.co.uk/somersetorganicsstylee.css" TYPE="text/css">');

}


which chooses the sylesheet, in nn4.79 it works fine and writes it to the page perfectly, I cant work out what its doing to nn6+
×

Success!

Help @felixcorke 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.15,
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,
)...