Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

targeting specific browsers

Status
Not open for further replies.

hablablow

Programmer
Sep 9, 2000
115
FR
Hi,
I would like to hide content to specific browsers: Opera and Safari.
Both script work fine alone. But when i mix them, as shown below, Opera just misses the part he should read.
Why is that?
Thanks for incomming answers.

Guillaume.



// fix z-index layer in Opera

function killOpera() {
var op = navigator.userAgent.indexOf('Opera') != -1;

if (op) {
document.getElementById('topSword').style.display = 'none';
document.getElementById('topSwordOpera').style.display = 'block';

}
}

onload = killOpera;


// -->

// fix z-index flash layer transparecy in Safari

function killSafari() {
var sa = navigator.userAgent.indexOf('Safari') != -1;

if (sa) {
document.getElementById('topSword').style.display = 'none';
document.getElementById('topSwordOpera').style.display = 'block';

}
}

onload = killSafari;


// -->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top