Hi,
Got a problem with some javascript I've just written :(
It looks like;
<!-- Begin
function docheck() {
var isIE = false;
var isNav = false;
if (navigator.appName == "Netscape") {
isNav = true
} else {
isIE = true
}
if (isIE) {
document.getElementById('loadingdiv').style.display = 'none';
document.getElementById('downloadit').style.display = 'block';
}
if (isNav) {
document.getElementById('loadingdiv').style.display = 'none';
document.getElementById('downloadit').style.display = 'block';
}
alert("Browser: " + navigator.appName);
}
// End -->
</script>
<body class="body_1col" onload="javascript: docheck()">
Basically, when the page loads... docheck() is run, and decides it its an IE or Mozilla browser.
This part works fine in IE... but not FireFox;
document.getElementById('downloadit').style.display = 'block';
Anyone got any ideas? (I'm basically trying to make a "loading" div, which gets shown while the page loads, and then dissapears after its finished ... revealing the main div, which has the content in it :)).
TIA
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Got a problem with some javascript I've just written :(
It looks like;
Code:
<script language="JavaScript"> <!-- Begin
function docheck() {
var isIE = false;
var isNav = false;
if (navigator.appName == "Netscape") {
isNav = true
} else {
isIE = true
}
if (isIE) {
document.getElementById('loadingdiv').style.display = 'none';
document.getElementById('downloadit').style.display = 'block';
}
if (isNav) {
document.getElementById('loadingdiv').style.display = 'none';
document.getElementById('downloadit').style.display = 'block';
}
alert("Browser: " + navigator.appName);
}
// End -->
</script>
<body class="body_1col" onload="javascript: docheck()">
Basically, when the page loads... docheck() is run, and decides it its an IE or Mozilla browser.
This part works fine in IE... but not FireFox;
Code:
document.getElementById('loadingdiv').style.display = 'none'; document.getElementById('downloadit').style.display = 'block';
Anyone got any ideas? (I'm basically trying to make a "loading" div, which gets shown while the page loads, and then dissapears after its finished ... revealing the main div, which has the content in it :)).
TIA
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

