[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

off topic: js and css issue



PureBytes Links

Trading Reference Links


For all instances in website development it's impossible to use the same css
file for different browsers. As a workaround, how can I load the browser
header after detecting a user's browser. For example, what command would I
use, if there's one available, in the following script to replace style?

<SCRIPT LANGUAGE="JavaScript"><!--
if (navigator.appName == 'Netscape')
    style = '<link rel="stylesheet" type="text/css" href="/styles/ns.css">';
else {
    if (navigator.appName == 'Microsoft Internet Explorer')
	  style = '<link rel="stylesheet" type="text/css" href="/styles/caw.css">';
    else if (navigator.appName == '*')
     style = '<link rel="stylesheet" type="text/css"
href="/styles/ns.css">';
}
//--></SCRIPT>


Thanks in advance.
Colin West
cwest@xxxxxxxxxxxx