/    Sign up×
Community /Pin to ProfileBookmark

Help with a JavaScript source script

I used a copy and paste script from JavaScript Source for a [URL=http://javascript.internet.com/games/crab-race.html]game[/URL] and followed all the instructions but it’s not working properly on my webpage. Could someone could take a quick look [URL=http://www.jossysgiants.org/crabrace.html]here[/URL] and explain to me why it’s not showing up as it should (in words of one syllable please – I’m a bit rubbish!)?

Thank you! ?

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@zaldunSep 04.2006 — From the source of the page:


====================

....

function browser_check() {

var lecture = "Your browser does not support dynamic HTML n"

+"- this page cannot display in your browser.";

var browser = (document.all || document.layers) ? true : alert(lecture);

}

// End -->

</script>

</head>

<BODY OnLoad="browser_check()">

...
========================



the code of your page makes certain check for browser, and in this case if browser is IE or compatible with IE DOM ( for example Opera ...), then it will load the game, but if loading it in Mozilla based browsers (Firefox and such) for example it wont because such bit of code;

i figure that the game wont work in Mozilla if removing such check, though i am lazy to try ... ?

ask game developers to make more cross-browser code ! ?
Copy linkTweet thisAlerts:
@zaldunSep 04.2006 — i correct myself, it checks for browsers supporting IE and also Netscape 4.x, so it sounds like old code ...;

and i was a bit less lazy, and tried to save complete page, then remove the checking, by removing OnLoad="browser_check()" from the BODY tag, but it didnt work .. so i switched on the lazy state .. :-D
Copy linkTweet thisAlerts:
@ozgoelzauthorSep 04.2006 — I'm afraid that went over my head a bit! Does that means it's an old code and won't necessarily work in newer browsers?
Copy linkTweet thisAlerts:
@felgallSep 04.2006 — It is designed for version 4 browsers and wont work in most more recent browsers.
Copy linkTweet thisAlerts:
@ozgoelzauthorSep 04.2006 — Thank you!
×

Success!

Help @ozgoelz 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.28,
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,
)...