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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to load css (dynamically) in Safari

Status
Not open for further replies.

jaschulz

Programmer
Joined
May 20, 2005
Messages
89
Location
FR
The function below works fine in FF, IE and Opera. But it does not work in Safari. Is there a work-around for this problem?

thanks,

JAS

function loadStyles() {
var oLink = document.createElement('link')
oLink.href = './CSS/myStyles.css';
oLink.rel = 'stylesheet';
oLink.type = 'text/css';
oLink.media = 'screen';
document.body.appendChild(oLink);
}
 
Win XPPro SP2 and Safari 3.15 (525.13)

JAS
 
Perfect! Thanks very much.

JAS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top