Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Works in IE / fails in Netscape

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
This script is used to cycle through the "MouseOver" images upon a user's arrival at our site - but in Netscape, debugging the JavaScript returns "Roll1" not defined.

Any assistance would be greatly appreciated.

<SCRIPT Language=Javascript>
function StartRoll()
{
setTimeout('Roll1()',1000);
}

function Roll1()
{
MM_swapImage('Image1','','IMAGES/shpr_ro.gif',1);
MM_showHideLayers('Price','','show');
setTimeout('HideRoll1()',1000);
}

function HideRoll1()
{
MM_swapImgRestore();
MM_showHideLayers('Price','','hide');
Roll2();
}

function Roll2()
{
MM_swapImage('Image2','','IMAGES/shco_ro.gif',1);
MM_showHideLayers('company','','show');
setTimeout('HideRoll2()',1000);
}

function HideRoll2()
{
MM_swapImgRestore();
MM_showHideLayers('company','','hide');
Roll3();
}

function Roll3()
{
MM_swapImage('Image3','','IMAGES/shben_ro.gif',1);
MM_showHideLayers('Bene','','show');
setTimeout('HideRoll3()',1000);
}

function HideRoll3()
{
MM_swapImgRestore();
MM_showHideLayers('Bene','','hide');
}

StartRoll();

</SCRIPT>
 
I'm not sure if it matters with JavaScript, but try defining
Code:
Roll1()
before
Code:
StartRoll()
.

Why exactly are you doing this? It seems to me there are easier ways to do what I think you are trying to do.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
That was one of the first things I tried.
The reasons for the existance of this code was not under my control - but the &quot;Product&quot; team felt that the user landing on our home page would not know that there was text and functionality under the images - so they wanted to cycle through the &quot;MouseOver&quot; images to draw the user's attention.

(See for an example)

There are some dificulties in implementing some solutions because the JavaScript I listed is isolated in a database field and retrieved by a Dynamic Content Engine - so the surrounding HTML is always called and the specific JavaScript is only called for this particular client.

It just looked like such an easy thing to fix - but the solution has proven more allusive.

I'm open to your suggestions for a better way.
 
maybe the Dreamweaver (MM_?) functions haven't loaded yet, try placing the last line - StarRoll() - in the onload event of the body jared@aauser.com
 
Yeah - that was the second thing I tried (and I got the same advice on another board) - unfortunately, that still doesn't kick the Netscape instance into functioning
 
I would create my own rollover functions again, that doesn't prevent you from still retrieving the js from the database, just makes it so its all in your hands then. Re-write them (however inefficient that may be, but hey, if its gotta work...) and use the same roll functions, those should work jared@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top