PDA

View Full Version : javascript help needed!


scottee2hottee2
11-06-2002, 10:12 AM
hello i have a website.. and im trying too do the navigator that folds down as u roll over.. i did this using macromedia fireworks.

and the javascript seems fine when i run on my own computer.. i upload too geocities.. which is the only free server i have got.. and it has most my information.. and it loads up so many errors that where not there in my version on my computer.. and also doesnt work..
here is the link too the site..
http://www.geocities.com/scottee2hottee2/itsite/
and
here is the javascript (its long).. if anyone could plz help a newbie out.

<html>
<head>
<title>index.gif</title>
<meta http-equiv="Content-Type" content="text/html;">
<!-- Fireworks 4.0 Dreamweaver 4.0 target. Created Wed Nov 06 20:42:40 GMT+1100 (AUS Eastern Daylight Time) 2002-->
<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_nbGroup(event, grpName) { //v3.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
} else if (event == "down") {
if ((nbArr = document[grpName]) != null)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function fwLoadMenus() {
if (window.fw_menu_0) return;
window.fw_menu_0_1 = new Menu("3d Design",121,21,"Arial, Helvetica, sans-serif",14,"#000000","#000000","#ffffff","#99ccff");
fw_menu_0_1.addMenuItem("Poser","location='poser.html'");
fw_menu_0_1.addMenuItem("Rhino 3d","location='rhino.html'");
fw_menu_0_1.addMenuItem("3d Studio Max","location='3dsmax.html'");
fw_menu_0_1.addMenuItem("Other","location='3dother.html'");
fw_menu_0_1.addMenuItem("Links","location='3dLinks.html'");
fw_menu_0_1.bgImageUp="images/fwmenu2_121x21_up.gif";
fw_menu_0_1.bgImageOver="images/fwmenu2_121x21_over.gif";
fw_menu_0_1.hideOnMouseOut=true;
window.fw_menu_0_2 = new Menu("Flash",121,21,"Arial, Helvetica, sans-serif",14,"#000000","#000000","#ffffff","#99ccff");
fw_menu_0_2.addMenuItem("Examples","location='flashexamples.html'");
fw_menu_0_2.addMenuItem("Flash Links","location='links.html'");
fw_menu_0_2.bgImageUp="images/fwmenu2_121x21_up.gif";
fw_menu_0_2.bgImageOver="images/fwmenu2_121x21_over.gif";
fw_menu_0_2.hideOnMouseOut=true;
window.fw_menu_0 = new Menu("root",121,21,"Arial, Helvetica, sans-serif",14,"#000000","#000000","#ffffff","#99ccff");
fw_menu_0.addMenuItem("Graphics","location='graphics.html'");
fw_menu_0.addMenuItem(fw_menu_0_1,"location='3ddesign.html'");
fw_menu_0.addMenuItem(fw_menu_0_2,"location='flash.html'");
fw_menu_0.addMenuItem("Tutorials","location='tutorials.html'");
fw_menu_0.bgImageUp="images/fwmenu2_121x21_up.gif";
fw_menu_0.bgImageOver="images/fwmenu2_121x21_over.gif";
fw_menu_0.hideOnMouseOut=true;
fw_menu_0.childMenuIcon="images/arrows.gif";
window.fw_menu_1 = new Menu("root",146,21,"Arial, Helvetica, sans-serif",14,"#000000","#000000","#ffffff","#99ccff");
fw_menu_1.addMenuItem("Renderosity.","window.open('http://www.renderosity.com', '_blank');");
fw_menu_1.addMenuItem("Games-Workshop","window.open('http://www.games-workshop.com', '_blank');");
fw_menu_1.addMenuItem("Runescape","window.open('http://www.runescape.com', '_blank');");
fw_menu_1.addMenuItem("Tip.it","window.open('http://www.tip.it/runescape/', '_blank');");
fw_menu_1.addMenuItem("Wetnet Software","window.open('http://www.wetnet.com.au', '_blank');");
fw_menu_1.addMenuItem("&lt;More to Come&gt;");
fw_menu_1.bgImageUp="images/fwmenu1_146x21_up.gif";
fw_menu_1.bgImageOver="images/fwmenu1_146x21_over.gif";
fw_menu_1.hideOnMouseOut=true;

fw_menu_1.writeMenus();
} // fwLoadMenus()

//-->
</script>
<script language="JavaScript1.2" src="fw_menu.js"></script>
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#ffffff" onLoad="MM_preloadImages('images/index_r2_c1_f2.gif','images/index_r2_c1_f4.gif','images/index_r2_c1_f3.gif','images/index_r2_c2_f2.gif','images/index_r2_c2_f4.gif','images/index_r2_c2_f3.gif','images/index_r2_c4_f2.gif','images/index_r2_c4_f4.gif','images/index_r2_c4_f3.gif','images/index_r2_c5_f2.gif','images/index_r2_c5_f4.gif','images/index_r2_c5_f3.gif','images/index_r2_c6_f2.gif','images/index_r2_c6_f4.gif','images/index_r2_c6_f3.gif');">
<div align="center">
<script language="JavaScript1.2">fwLoadMenus();</script>
<table border="0" cellpadding="0" cellspacing="0" width="405">
<!-- fwtable fwsrc="fav.png" fwbase="index.gif" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td><img src="images/spacer.gif" width="41" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="94" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="125" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="60" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="84" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0"></td>
</tr>
<tr>
<td colspan="6"><img name="index_r1_c1" src="images/index_r1_c1.gif" width="405" height="5" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="5" border="0"></td>
</tr>
<tr>
<td><a href="#" onMouseOut="MM_nbGroup('out');" onMouseOver="MM_nbGroup('over','index_r2_c1','images/index_r2_c1_f2.gif','images/index_r2_c1_f4.gif',1);" onClick="MM_nbGroup('down','navbar1','index_r2_c1','images/index_r2_c1_f3.gif',1);" ><img name="index_r2_c1" src="images/index_r2_c1.gif" width="41" height="14" border="0"></a></td>
<td rowspan="2" colspan="2"><a href="#" onMouseOut="MM_nbGroup('out');" onMouseOver="MM_nbGroup('over','index_r2_c2','images/index_r2_c2_f2.gif','images/index_r2_c2_f4.gif',1);" onClick="MM_nbGroup('down','navbar1','index_r2_c2','images/index_r2_c2_f3.gif',1);" ><img name="index_r2_c2" src="images/index_r2_c2.gif" width="95" height="15" border="0"></a></td>
<td rowspan="2"><a href="#" onMouseOut="MM_nbGroup('out');FW_startTimeout();" onMouseOver="window.FW_showMenu(window.fw_menu_0,133,27);MM_nbGroup('over','index_r2_c4','images/index_r2_c4_f2.gif','images/index_r2_c4_f4.gif',1);" onClick="MM_nbGroup('down','navbar1','index_r2_c4','images/index_r2_c4_f3.gif',1);" ><img name="index_r2_c4" src="images/index_r2_c4.gif" width="125" height="15" border="0"></a></td>
<td rowspan="2"><a href="#" onMouseOut="MM_nbGroup('out');FW_startTimeout();" onMouseOver="window.FW_showMenu(window.fw_menu_1,216,21);MM_nbGroup('over','index_r2_c5','images/index_r2_c5_f2.gif','images/index_r2_c5_f4.gif',1);" onClick="MM_nbGroup('down','navbar1','index_r2_c5','images/index_r2_c5_f3.gif',1);" ><img name="index_r2_c5" src="images/index_r2_c5.gif" width="60" height="15" border="0"></a></td>
<td><a href="#" onMouseOut="MM_nbGroup('out');" onMouseOver="MM_nbGroup('over','index_r2_c6','images/index_r2_c6_f2.gif','images/index_r2_c6_f4.gif',1);" onClick="MM_nbGroup('down','navbar1','index_r2_c6','images/index_r2_c6_f3.gif',1);" ><img name="index_r2_c6" src="images/index_r2_c6.gif" width="84" height="14" border="0"></a></td>
<td><img src="images/spacer.gif" width="1" height="14" border="0"></td>
</tr>
<tr>
<td><img name="index_r3_c1" src="images/index_r3_c1.gif" width="41" height="1" border="0"></td>
<td><img name="index_r3_c6" src="images/index_r3_c6.gif" width="84" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0"></td>
</tr>
</table>
</div>
</body>
</html>

thank you for reading all that if u did.
thank you for people who can help out..

krycek
11-06-2002, 10:53 AM
well, personally I don't feel like wading through all that code - especially as it is from Fireworks!

Maybe if you code something yourself and make your request a little clearer in relation to what is wrong now, and what you want to do (not to mention a more fitting subject title! ;)) you may get a response.

Not flaming - just a little advice about how to get help on this :)

::] krycek [::

scottee2hottee2
11-06-2002, 02:35 PM
well im so sorry.

i seem too have the correct coding.. i had a friend peer check it.. and he knows more about that sort of programming then myself.
and he has his own server.. uploaded it on there.. and it worked fine

so we put it down too probably the geocities servers.. which i am going too get my account off.
cause im paying for a spot on his server.

ok well thats the major story too happen.
i wanted too delete this.. but cause u posted after me.. i cant.. so ohh well.

thanks for insulting me.
and giving me some tips too.. though u probably never see me on here.. much

cya

krycek
11-06-2002, 02:53 PM
um... I was not aware I "insulted" you! :confused:

If you have the correct code, then fine :) but be aware that people (well, me!) are not likely to want to look through piles of code that has been automatically generated. If nothing else, it suggests that you do not really know what the code is doing, and therefore any help given will probably be limited in its usefulness to you.

I am glad you got the problem fixed but I do not see what geocities has got to do with it - this is JavaScript which is client-side, not server-side, so it should work (or not work!) regardless of your host. Possibly you uploaded it wrongly, or linked in your files wrongly?

Never mind...

But there we go, you can't please everyone! (It would help if you had read the MUST READ post about posting, for a start!)

::] krycek [::

Roelf
11-06-2002, 02:54 PM
My guess is that the code added to your page by geocities is conflicting with your code. Your friends server doesn´t add anything to your page, so everything will be fine when you have site space on his server