Forum Moderators: open
okay, the script is as follows:
//set up quote for now
var quotetouse="quote" ;
document.all.qlayer.innerHTML=quotetouse ;
var cat=99 ;
//end set up quote
//this func is called when user mouses over an image, as follows: onMouseOver="swapoutquote(1);"
function swapoutquote(cat) {
if (cat=1) {
desc="Category1desc"; }
if (cat=2) {
desc="Category2desc"; }
if (cat=3) {
desc="Category3desc"; }
if (cat=4) {
desc="Category4desc"; }
if (cat=5) {
desc="Category5desc"; }
if (cat=6) {
desc="Category6desc"; }
if (cat=7) {
desc="Category7desc"; }
if (cat=8) {
desc="Category8desc"; }
if (cat=9) {
desc="Category9desc"; }
if (cat=0) {
desc="Category0desc"; }
if (cat=99) {
desc="!!<br>Error!"; }
document.all.qlayer.innerHTML=desc;
}
function swapinquote() {
document.all.qlayer.innerHTML=quotetouse;
}
what it does is say "Error!" indicating that cat still equals 99? or is it just assigning desc to the last one? Cos before i added the '99' error checking it was setting desc to "Category0desc".
if you go to the link, the nav in question is the pic at left, but i only put the onMouseOver's on the top 2 slices so far.
thx for any help!
-dan
(edited by: tedster at 9:02 am (utc) on Mar. 11, 2002)
Looks to me like you need to edit the onMouseover function calls -- right now you still have some Dreamweaver code:
onMouseOver="MM_callJS('swapoutquote(1);')"
should probably be:
onMouseOver="swapoutquote(1)"
Also, be warned that there are several recent browsers that don't support onMouseover for image tags - better to put all your onMouseover calls in the anchor tag for cross-browser support.
It's actually doesn't exist. It's something that IE threw into the language and that later versions of Netscape picked up because of popular demand.
There are other ways of doing it, both for image mouseovers and for more in depth dynamic content.
The other benefit of using alternate methods is that they involve both the default text/code and the text/code that replaces it actually existing on the page (as far as a robot is concerned). Good for search engine indexing.
Thanks.
-Dan
Also, does anyone care to enlighten me as to the following:
(A) What Netscape compatibility can I expect for the innerHTML? As long as v6 is supported, it's good enough for the moment.
(B) What is a good way to do something like this which would be very cross-browser?
Thanks for your help,
Dan
Since the client I'm working on this for is a big Netscape fan, it should be changed, even though that particular effect is only secondary in nature. We're going to put the name of each category on the "over" version of each slice.