Archive for June, 2002

Javascript calls & comments

Friday, June 28th, 2002

Like many users of MT, I use javascript to call a pop-up comment window. What I didn’t realize though is that 11% of internet users don’t use Javascript and it can cause problems for people who are disabled because their browsers don’t support it. Mark has posted instructions on how to replace the code so that you can still have pop-ups but also have a solution that works for other browsers. You can find it here. He has pointed out that the latest default templates in MT now “get this right” - but if you’re like me, I don’t normally upgrade my templates every time I upgrade MT.

I should also point out that Mark is doing a whole series on 30 Days to a More Accessible Weblog and there are a lot of other really good tips worth reading there!

load different stylesheet based on browser

Friday, June 28th, 2002

Thought I posted this here already, but I guess I didn’t. Here’s a javascript to detect the user’s browser, and load the appropriate stylesheet. I came up with this script because some of the css things I had once been doing were not friendly with NS.

<SCRIPT language=”JavaScript”>
<!–
var browserName=navigator.appName;
if (browserName==”Microsoft Internet Explorer”)
{
//load ie friendly stylesheet
document.write(’<link rel=”stylesheet” href=”/stylesie.css” type=”text/css”>’)
}
else
{
if ((parseFloat(navigator.appVersion)) >= 5 )
{
// if ns version is great than or equal to 5 (6) load this stylesheet
document.write(’<link rel=”stylesheet” href=”/stylesie.css” type=”text/css”>’)
} else {
//if you have a really ancient browser ;-) (ie. NS 4.7 or earlier) load this stylesheet
document.write(’<link rel=”stylesheet” href=”/stylesns.css” type=”text/css”>’)
}
}
//–>
</SCRIPT>
<NOSCRIPT>
<!– if you don’t have javascript running - assume you have an ancient browser and load the ancient friendly stylesheet –>
<link rel=”stylesheet” href=”/stylesns.css” type=”text/css”>
</NOSCRIPT>

I’m sure there’s a way to do that in PHP - anyone want to take a shot?

Hide all status bar messages

Thursday, June 27th, 2002

A script that will hide all status bar messages… (I’ve needed this script more than once!)

  • You are currently browsing the scriptygoddess blog archives for June, 2002.

  • Archives

  • Categories