clionton
07-25-2002, 01:31 AM
Hi
Can anybody tell me how to make this code run in netscape navigator
//var nonie4 = "/index.html";
var bAnimate = true;
var nStep = 10;
var nDelay = 20;
var nChunk;
//var useragent = navigator.userAgent;
// redirect all but IE 4.x on Win32 to
//if (useragent.indexOf("MSIE")==-1) {
// window.location = nonie4;
//} else {
// if ((navigator.appVersion.substring(0,1) < 4) ||
// (useragent.indexOf("Windows 3.1") != -1) ||
// (useragent.indexOf("X11") != -1) ||
// (useragent.indexOf("Mac") != -1))
// {
// window.location = nonie4;
// }
//}
function doMenu(id, x, y) {
var thisMenu = document.all(id);
// check if we're already animating the requested menu
if (thisMenu == AnimatedMenu) {
window.event.cancelBubble = true;
return false;
}
// if were animating a different menu then hide that one and animate the requested on
if (AnimatedMenu != null) AnimatedMenu.style.display = "none";
window.event.cancelBubble = true;
// set x and y location for the menu
// if x is negative then subtract from screen width
if( x < 0 ) {
x = document.body.clientWidth + x;
}
thisMenu.style.left = x;
thisMenu.style.top = y;
AnimatedMenu = thisMenu;
if (bAnimate) {
// we're animating so init everything
thisMenu.style.clip = "rect(0 0 0 0)";
thisMenu.style.display = "block";
nChunk = nStep;
window.setTimeout("showMenu()", nDelay);
}
else {
// no animation, just show it
AnimatedMenu.style.display = "";
}
}
function showMenu() {
AnimatedMenu.style.clip = "rect(0 "+ nChunk + "% " + nChunk + "% 0)"
nChunk += nStep;
nChunk<=100?window.setTimeout("showMenu()",nDelay):null
}
function hideMenu(){
AnimatedMenu.style.display = "none";
AnimatedMenu = StartMenu;
window.event.cancelBubble = true;
}
function keepMenu(){
window.event.cancelBubble = true;
}
document.onmouseover = hideMenu;
i have this code in the body of my html page
<BODY>
<SPAN ID='StartMenu' STYLE='display:none; position:absolute;'></SPAN>
<A TARGET=_top HREF="index.html" onMouseover=""><IMG SRC="home.jpg" BORDER=""></A>
<A TARGET=_top HREF="wtpbenefits.html"onMouseover=""><IMG SRC="benefits.jpg" BORDER="0"></A>
<A TARGET=_top onMouseover="doMenu('s2menu', 257, 116)"><IMG SRC="accountinfo.jpg" BORDER="0"></A>
<A TARGET=_top onMouseover="doMenu('s3menu', 377, 116)"><IMG SRC="resources.jpg" BORDER="0"></A>
<A TARGET=_top onMouseover="doMenu('s4menu', 498, 116)"><IMG SRC="faq.jpg" BORDER="0"></A>
<A TARGET=_top HREF="contactus.html" onMouseover=""><IMG SRC="contactus.jpg" BORDER="0"></A>
<A TARGET=_top HREF="sitemap.html" onMouseover=""><IMG SRC="sitemap.jpg" BORDER="0"></A>
<SCRIPT TYPE="text/javascript">
var AnimatedMenu = StartMenu;
</SCRIPT>
<SPAN ID='s1menu' ' CLASS='menubox'>
</SPAN>
<SPAN ID='s2menu' onMouseover='keepMenu();' CLASS='menubox'>
<A CLASS='menutext' target=_top HREF='acfees.html'> Fees Information</A> <BR>
<A CLASS='menutext' target=_top HREF='acopen.html'> Opening an Account</A> <BR>
<A CLASS='menutext' target=_top HREF='accashier.html'> Cashier</A> <BR>
<A CLASS='menutext' target=_top HREF='acwire.html'> Wire Information</A> <BR>
</SPAN>
<SPAN ID='s3menu' onMouseover='keepMenu();' CLASS='menubox'>
<A CLASS='menutext' target=_top HREF='rswdownload.html'> Software Downloads</A> <BR>
<A CLASS='menutext' target=_top HREF='rdemo.html'> Demo</A> <BR>
<A CLASS='menutext' target=_top HREF='rother.html'> Links to other Financial Sites</A> <BR>
<A CLASS='menutext' target=_top HREF='htblist.html'> Hard To Borrow List</A>
</SPAN>
<SPAN ID='s4menu' onMouseover='keepMenu();' CLASS='menubox'>
<A CLASS='menutext' target=_top HREF='accfundingfaq.html'> Account Funding FAQ</A> <BR>
<A CLASS='menutext' target=_top HREF='marginfaq.html'> Margin FAQ</A> <BR>
<A CLASS='menutext' target=_top HREF='systemfaq.html'> System FAQ</A> <BR>
<A CLASS='menutext' target=_top HREF='accfaq.html'> Account FAQ</A> <BR>
</SPAN>
</BODY>
Thanks
Can anybody tell me how to make this code run in netscape navigator
//var nonie4 = "/index.html";
var bAnimate = true;
var nStep = 10;
var nDelay = 20;
var nChunk;
//var useragent = navigator.userAgent;
// redirect all but IE 4.x on Win32 to
//if (useragent.indexOf("MSIE")==-1) {
// window.location = nonie4;
//} else {
// if ((navigator.appVersion.substring(0,1) < 4) ||
// (useragent.indexOf("Windows 3.1") != -1) ||
// (useragent.indexOf("X11") != -1) ||
// (useragent.indexOf("Mac") != -1))
// {
// window.location = nonie4;
// }
//}
function doMenu(id, x, y) {
var thisMenu = document.all(id);
// check if we're already animating the requested menu
if (thisMenu == AnimatedMenu) {
window.event.cancelBubble = true;
return false;
}
// if were animating a different menu then hide that one and animate the requested on
if (AnimatedMenu != null) AnimatedMenu.style.display = "none";
window.event.cancelBubble = true;
// set x and y location for the menu
// if x is negative then subtract from screen width
if( x < 0 ) {
x = document.body.clientWidth + x;
}
thisMenu.style.left = x;
thisMenu.style.top = y;
AnimatedMenu = thisMenu;
if (bAnimate) {
// we're animating so init everything
thisMenu.style.clip = "rect(0 0 0 0)";
thisMenu.style.display = "block";
nChunk = nStep;
window.setTimeout("showMenu()", nDelay);
}
else {
// no animation, just show it
AnimatedMenu.style.display = "";
}
}
function showMenu() {
AnimatedMenu.style.clip = "rect(0 "+ nChunk + "% " + nChunk + "% 0)"
nChunk += nStep;
nChunk<=100?window.setTimeout("showMenu()",nDelay):null
}
function hideMenu(){
AnimatedMenu.style.display = "none";
AnimatedMenu = StartMenu;
window.event.cancelBubble = true;
}
function keepMenu(){
window.event.cancelBubble = true;
}
document.onmouseover = hideMenu;
i have this code in the body of my html page
<BODY>
<SPAN ID='StartMenu' STYLE='display:none; position:absolute;'></SPAN>
<A TARGET=_top HREF="index.html" onMouseover=""><IMG SRC="home.jpg" BORDER=""></A>
<A TARGET=_top HREF="wtpbenefits.html"onMouseover=""><IMG SRC="benefits.jpg" BORDER="0"></A>
<A TARGET=_top onMouseover="doMenu('s2menu', 257, 116)"><IMG SRC="accountinfo.jpg" BORDER="0"></A>
<A TARGET=_top onMouseover="doMenu('s3menu', 377, 116)"><IMG SRC="resources.jpg" BORDER="0"></A>
<A TARGET=_top onMouseover="doMenu('s4menu', 498, 116)"><IMG SRC="faq.jpg" BORDER="0"></A>
<A TARGET=_top HREF="contactus.html" onMouseover=""><IMG SRC="contactus.jpg" BORDER="0"></A>
<A TARGET=_top HREF="sitemap.html" onMouseover=""><IMG SRC="sitemap.jpg" BORDER="0"></A>
<SCRIPT TYPE="text/javascript">
var AnimatedMenu = StartMenu;
</SCRIPT>
<SPAN ID='s1menu' ' CLASS='menubox'>
</SPAN>
<SPAN ID='s2menu' onMouseover='keepMenu();' CLASS='menubox'>
<A CLASS='menutext' target=_top HREF='acfees.html'> Fees Information</A> <BR>
<A CLASS='menutext' target=_top HREF='acopen.html'> Opening an Account</A> <BR>
<A CLASS='menutext' target=_top HREF='accashier.html'> Cashier</A> <BR>
<A CLASS='menutext' target=_top HREF='acwire.html'> Wire Information</A> <BR>
</SPAN>
<SPAN ID='s3menu' onMouseover='keepMenu();' CLASS='menubox'>
<A CLASS='menutext' target=_top HREF='rswdownload.html'> Software Downloads</A> <BR>
<A CLASS='menutext' target=_top HREF='rdemo.html'> Demo</A> <BR>
<A CLASS='menutext' target=_top HREF='rother.html'> Links to other Financial Sites</A> <BR>
<A CLASS='menutext' target=_top HREF='htblist.html'> Hard To Borrow List</A>
</SPAN>
<SPAN ID='s4menu' onMouseover='keepMenu();' CLASS='menubox'>
<A CLASS='menutext' target=_top HREF='accfundingfaq.html'> Account Funding FAQ</A> <BR>
<A CLASS='menutext' target=_top HREF='marginfaq.html'> Margin FAQ</A> <BR>
<A CLASS='menutext' target=_top HREF='systemfaq.html'> System FAQ</A> <BR>
<A CLASS='menutext' target=_top HREF='accfaq.html'> Account FAQ</A> <BR>
</SPAN>
</BODY>
Thanks