You have some code for us to view?
.ted
OK.
It's an image map and I don't think it's a path problem as the images are appearing.
The problematic function is below. It works with this style definition:
#elMenuOver {
position: absolute;
visibility: hidden;
top: 0;
left: 0;
}And here's the call from the MAP tag: <area shape="rect" coords="-4,83 58,98" href="http://www.cancer.umn.edu/page/search.html" onmouseover="mapOver(1,true)" onmouseout="mapOver(1,false)" alt="Search">
The function is supposed to crop the image and place it over the nav menu and turn one of the nav items orangish. See:
http://www.cancer.umn.edu/page/aboutus/grantopp.html
for an example.
The cropping isn't happening on the cgi-generated page. The entire orangish image appears on top of the current image. (Sorry but I don't have a live sample of that yet that can be shown.)
So here's the function. Please note that it's not my JS and I don't do a lot of JS and I'm not looking for a complete overhaul as I just got it working OK in most browsers (that's what the 'gecko' code is about).
Thanks.
function mapOver(which,on) { if (!ver4) { return; } if (IE4) { whichEl = document.all.elMenuOver.style; } else if (gecko) {whichEl = document.getElementById("elMenuOver");} else { whichEl = document.elMenu.document.elMenuOver; };
if (!on) {
if (gecko) {
whichEl.style.visibility = "hidden"; return;
} else {
whichEl.visibility = "hidden"; return;
}
} clLeft = arPopups[which][0];
clRight = arPopups[which][1]; if (which < 6) {
clTop = 83;
clBot = 98;
} else {
clTop = 101;
clBot = 118;
} if (NS4) {
whichEl.clip.left = clLeft;
whichEl.clip.right = clRight;
whichEl.clip.top = clTop;
whichEl.clip.bottom = clBot;
}
else if (gecko) {
tempStr = "rect(";
tempStr += clTop;
tempStr += " ";
tempStr += clRight;
tempStr += " ";
tempStr += clBot;
tempStr += " ";
tempStr += clLeft;
tempStr += ")";
whichEl.style.clip = tempStr;
}
else if (IE4) {
tempStr = "rect(";
tempStr += clTop;
tempStr += " ";
tempStr += clRight;
tempStr += " ";
tempStr += clBot;
tempStr += " ";
tempStr += clLeft;
tempStr += ")";
whichEl.clip = tempStr;
}
if (gecko) {
whichEl.style.visibility = "visible";
} else {
whichEl.visibility = "visible";
}
}
-----Original Message----- From: Peter Fleck [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 12:09 PM To: [EMAIL PROTECTED] Subject: Javascript and Perl Problem
I have some complex (at least to me) javascript on a perl-generated page that's not working correctly. The same javascript works fine on a static page. I should mention that some javascript is working on the dynamic page but it's not doing what it's supposed to do.
Before I post any code, I'm hoping that there may be some problems that I'm not aware of concerning javascript on perl pages.
I just finished optimizing the javascript for display on multiple browsers and it's working fine for static pages.
-- Peter Fleck Webmaster | University of Minnesota Cancer Center Dinnaken Office Bldg. 925 Delaware St. SE Minneapolis, MN 55414 612-625-8668 | [EMAIL PROTECTED] | www.cancer.umn.edu Campus Mail: MMC 806
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
