Cadwalader
IS-IT--Management
Please help, I got a nasty letter on my desk thismorning from the boss about a rollover script that I used on one of his sites. It runs slower than molassas in January, going uphill in the snow, thanks to IE6. Unfortunately, 99.2% of all the hits on this website are IE5.5 and 6. So I have to make it work right.
I've dug around on the Internet this morning and found that IE is hitting the server everytime you run the mouse over one of the images. I know it works fine for you folks lucky enough to have a Pentuim4, but for the 500MHz CPU's in this office, it's not working. I also red that IE6 parses everything everytime something is called, or needed, or changed...or something like that.. So anyway, I looked for an alternative script in tek-tips, and several other js sites, but I am so confused, there is smoke coming out of my ears now.
Ok, in a nutshell, I need to make this script stop IE from getting the pics from the server all the time, and use the cache. Is there a way to do that?
If not, is there another type of script I could use? I am week with JavaScript.
I despratlely need help. I am getting the distinct feeling that if I can't fix this today, I won't have a job tomorrow. here is the code.
<html>
<head>
<title>Pharmacy Care Specialists - (800) 350-2325</title>
<script LANGUAGE="JavaScript">
ap="'";
loaded=true;
if (document.images){
var tb1_d = new Image(100,29);
tb1_d.src = "images/hometab.gif";
var tb2_d = new Image(100,29);
tb2_d.src = "images/aboutustab.gif";
var tb3_d = new Image(100,29);
tb3_d.src = "images/alftab.gif";
var tb4_d = new Image(100,29);
tb4_d.src = "images/womentab.gif";
var tb5_d = new Image(100,29);
tb5_d.src = "images/mentab.gif";
var tb6_d = new Image(100,29);
tb6_d.src = "images/faq.gif";
var tb7_d = new Image(100,29);
tb7_d.src = "images/contactustab.gif";
var CId = new Image(700,21);
CId.src = "images/alfbar.gif";
var tb1_ = new Image(100,29);
var tb1_h = new Image(100,29);
tb1_h.src = "images/hometab.gif";
var CI1_h = new Image(700,21);
CI1_h.src = "images/bar.gif";
var tb2_ = new Image(100,29);
var tb2_h = new Image(100,29);
tb2_h.src = "images/aboutustab.gif";
var CI2_h = new Image(700,21);
CI2_h.src = "images/aboutusbar.gif";
var tb3_ = new Image(100,29);
var tb3_h = new Image(100,29);
tb3_h.src = "images/alftab.gif";
var CI3_h = new Image(700,21);
CI3_h.src = "images/alfbar.gif";
var tb4_ = new Image(100,29);
var tb4_h = new Image(100,29);
tb4_h.src = "images/womentab.gif";
var CI4_h = new Image(700,21);
CI4_h.src = "images/womenbar.gif";
var tb5_ = new Image(100,29);
var tb5_h = new Image(100,29);
tb5_h.src = "images/mentab.gif";
var CI5_h = new Image(700,21);
CI5_h.src = "images/mensbar.gif";
var tb6_ = new Image(100,29);
var tb6_h = new Image(100,29);
tb6_h.src = "images/faq.gif";
var CI6_h = new Image(700,21);
CI6_h.src = "images/faqbar.gif";
var tb7_ = new Image(100,29);
var tb7_h = new Image(100,29);
tb7_h.src = "images/contactustab.gif";
var CI7_h = new Image(700,21);
CI7_h.src = "images/contactbar.gif";
}
tb1_m = 'Welcome to PCS!';
tb2_m = 'About PCS';
tb3_m = 'ALF Services';
tb4_m = 'Growth Hormones';
tb5_m = 'Compounding Services';
tb6_m = 'Frequently Asked Questions';
tb7_m = 'Contact Us';
dm = "Document Done.";
function cb(){if(document.images&&loaded){return true}else{return false}}
</script>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="#ffffff" text="#000000" link="#0033CC" vlink="#0033CC" alink="#0033CC" leftmargin="10">
<img src="images/logohead.gif" ><br>
<h1>Specializing in unit dose dispensing sytems for adult living facilities.</h1>
<table width="700px" border="0" cellpadding="0" cellspacing="0"><tr><td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td><center>
<a href=" target="_self" onmouseover="if(cb()){tb1_.src=tb1_h.src;CI.src=CI1_h.src;}window.status=tb1_m;return true" onmouseout="if(cb()){tb1_.src=tb1_d.src;CI.src=CId.src;}return true;"><img src="images/hometab.gif" alt="..." border="0" width="100" height="29" name="tb1_"></a><a href=" onmouseover="if(cb()){tb2_.src=tb2_h.src;CI.src=CI2_h.src;}window.status=tb2_m;return true" onmouseout="if(cb()){tb2_.src=tb2_d.src;CI.src=CId.src;}return true;"><img src="images/aboutustab.gif" alt="..." border="0" width="100" height="29" name="tb2_"></a><a href=" target="_self"onmouseover="if(cb()){tb3_.src=tb3_h.src;CI.src=CI3_h.src;}window.status=tb3_m;return true" onmouseout="if(cb()){tb3_.src=tb3_d.src;CI.src=CId.src;}return true;"><img src="images/alftab.gif" alt="..." border="0" width="100" height="29" name="tb3_"></a><a href=" target="_self" onmouseover="if(cb()){tb4_.src=tb4_h.src;CI.src=CI4_h.src;}window.status=tb4_m;return true"onmouseout="if(cb()){tb4_.src=tb4_d.src;CI.src=CId.src;}return true;"><img src="images/womentab.gif" alt="..." border="0" width="100" height="29" name="tb4_"></a><a href=" target="_self" onmouseover="if(cb()){tb5_.src=tb5_h.src;CI.src=CI5_h.src;}window.status=tb5_m;return true" onmouseout="if(cb()){tb5_.src=tb5_d.src;CI.src=CId.src;}return true;"><img src="images/mentab.gif" alt="..." border="0" width="100" height="29" name="tb5_"></a><a href=" target="_self" onmouseover="if(cb()){tb6_.src=tb6_h.src;CI.src=CI6_h.src;}window.status=tb6_m;return true" onmouseout="if(cb()){tb6_.src=tb6_d.src;CI.src=CId.src;}return true;"><img src="images/faq.gif" alt="..." border="0" width="100" height="29" name="tb6_"></a><a href=" target="_self" onmouseover="if(cb()){tb7_.src=tb7_h.src;CI.src=CI7_h.src;}window.status=tb7_m;return true" onmouseout="if(cb()){tb7_.src=tb7_d.src;CI.src=CId.src;}return true;"><img src="images/contactustab.gif" alt="..." border="0" width="100" height="29" name="tb7_"></a></center></td>
</tr>
<tr>
<td><center><img src="images/alfbar.gif" alt="..." width="700" height="21" name="CI"></center></td>
</tr>
</tbody>
</table>
....and the rest is regular old HTML.....
The url to the live pages is menshealth.ws if you want to see what the heck is going on or copy the images for testing, or to laugh at how corny it looks (it's look and feel was not my idea, and I didn't have any say in it)...Thank you so much in advance...man, I am up to my neck in it today... Hope I was of some help...
--OR--
Thanks for the help...
--Rich
I've dug around on the Internet this morning and found that IE is hitting the server everytime you run the mouse over one of the images. I know it works fine for you folks lucky enough to have a Pentuim4, but for the 500MHz CPU's in this office, it's not working. I also red that IE6 parses everything everytime something is called, or needed, or changed...or something like that.. So anyway, I looked for an alternative script in tek-tips, and several other js sites, but I am so confused, there is smoke coming out of my ears now.
Ok, in a nutshell, I need to make this script stop IE from getting the pics from the server all the time, and use the cache. Is there a way to do that?
If not, is there another type of script I could use? I am week with JavaScript.
I despratlely need help. I am getting the distinct feeling that if I can't fix this today, I won't have a job tomorrow. here is the code.
<html>
<head>
<title>Pharmacy Care Specialists - (800) 350-2325</title>
<script LANGUAGE="JavaScript">
ap="'";
loaded=true;
if (document.images){
var tb1_d = new Image(100,29);
tb1_d.src = "images/hometab.gif";
var tb2_d = new Image(100,29);
tb2_d.src = "images/aboutustab.gif";
var tb3_d = new Image(100,29);
tb3_d.src = "images/alftab.gif";
var tb4_d = new Image(100,29);
tb4_d.src = "images/womentab.gif";
var tb5_d = new Image(100,29);
tb5_d.src = "images/mentab.gif";
var tb6_d = new Image(100,29);
tb6_d.src = "images/faq.gif";
var tb7_d = new Image(100,29);
tb7_d.src = "images/contactustab.gif";
var CId = new Image(700,21);
CId.src = "images/alfbar.gif";
var tb1_ = new Image(100,29);
var tb1_h = new Image(100,29);
tb1_h.src = "images/hometab.gif";
var CI1_h = new Image(700,21);
CI1_h.src = "images/bar.gif";
var tb2_ = new Image(100,29);
var tb2_h = new Image(100,29);
tb2_h.src = "images/aboutustab.gif";
var CI2_h = new Image(700,21);
CI2_h.src = "images/aboutusbar.gif";
var tb3_ = new Image(100,29);
var tb3_h = new Image(100,29);
tb3_h.src = "images/alftab.gif";
var CI3_h = new Image(700,21);
CI3_h.src = "images/alfbar.gif";
var tb4_ = new Image(100,29);
var tb4_h = new Image(100,29);
tb4_h.src = "images/womentab.gif";
var CI4_h = new Image(700,21);
CI4_h.src = "images/womenbar.gif";
var tb5_ = new Image(100,29);
var tb5_h = new Image(100,29);
tb5_h.src = "images/mentab.gif";
var CI5_h = new Image(700,21);
CI5_h.src = "images/mensbar.gif";
var tb6_ = new Image(100,29);
var tb6_h = new Image(100,29);
tb6_h.src = "images/faq.gif";
var CI6_h = new Image(700,21);
CI6_h.src = "images/faqbar.gif";
var tb7_ = new Image(100,29);
var tb7_h = new Image(100,29);
tb7_h.src = "images/contactustab.gif";
var CI7_h = new Image(700,21);
CI7_h.src = "images/contactbar.gif";
}
tb1_m = 'Welcome to PCS!';
tb2_m = 'About PCS';
tb3_m = 'ALF Services';
tb4_m = 'Growth Hormones';
tb5_m = 'Compounding Services';
tb6_m = 'Frequently Asked Questions';
tb7_m = 'Contact Us';
dm = "Document Done.";
function cb(){if(document.images&&loaded){return true}else{return false}}
</script>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="#ffffff" text="#000000" link="#0033CC" vlink="#0033CC" alink="#0033CC" leftmargin="10">
<img src="images/logohead.gif" ><br>
<h1>Specializing in unit dose dispensing sytems for adult living facilities.</h1>
<table width="700px" border="0" cellpadding="0" cellspacing="0"><tr><td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td><center>
<a href=" target="_self" onmouseover="if(cb()){tb1_.src=tb1_h.src;CI.src=CI1_h.src;}window.status=tb1_m;return true" onmouseout="if(cb()){tb1_.src=tb1_d.src;CI.src=CId.src;}return true;"><img src="images/hometab.gif" alt="..." border="0" width="100" height="29" name="tb1_"></a><a href=" onmouseover="if(cb()){tb2_.src=tb2_h.src;CI.src=CI2_h.src;}window.status=tb2_m;return true" onmouseout="if(cb()){tb2_.src=tb2_d.src;CI.src=CId.src;}return true;"><img src="images/aboutustab.gif" alt="..." border="0" width="100" height="29" name="tb2_"></a><a href=" target="_self"onmouseover="if(cb()){tb3_.src=tb3_h.src;CI.src=CI3_h.src;}window.status=tb3_m;return true" onmouseout="if(cb()){tb3_.src=tb3_d.src;CI.src=CId.src;}return true;"><img src="images/alftab.gif" alt="..." border="0" width="100" height="29" name="tb3_"></a><a href=" target="_self" onmouseover="if(cb()){tb4_.src=tb4_h.src;CI.src=CI4_h.src;}window.status=tb4_m;return true"onmouseout="if(cb()){tb4_.src=tb4_d.src;CI.src=CId.src;}return true;"><img src="images/womentab.gif" alt="..." border="0" width="100" height="29" name="tb4_"></a><a href=" target="_self" onmouseover="if(cb()){tb5_.src=tb5_h.src;CI.src=CI5_h.src;}window.status=tb5_m;return true" onmouseout="if(cb()){tb5_.src=tb5_d.src;CI.src=CId.src;}return true;"><img src="images/mentab.gif" alt="..." border="0" width="100" height="29" name="tb5_"></a><a href=" target="_self" onmouseover="if(cb()){tb6_.src=tb6_h.src;CI.src=CI6_h.src;}window.status=tb6_m;return true" onmouseout="if(cb()){tb6_.src=tb6_d.src;CI.src=CId.src;}return true;"><img src="images/faq.gif" alt="..." border="0" width="100" height="29" name="tb6_"></a><a href=" target="_self" onmouseover="if(cb()){tb7_.src=tb7_h.src;CI.src=CI7_h.src;}window.status=tb7_m;return true" onmouseout="if(cb()){tb7_.src=tb7_d.src;CI.src=CId.src;}return true;"><img src="images/contactustab.gif" alt="..." border="0" width="100" height="29" name="tb7_"></a></center></td>
</tr>
<tr>
<td><center><img src="images/alfbar.gif" alt="..." width="700" height="21" name="CI"></center></td>
</tr>
</tbody>
</table>
....and the rest is regular old HTML.....
The url to the live pages is menshealth.ws if you want to see what the heck is going on or copy the images for testing, or to laugh at how corny it looks (it's look and feel was not my idea, and I didn't have any say in it)...Thank you so much in advance...man, I am up to my neck in it today... Hope I was of some help...
--OR--
Thanks for the help...
--Rich