/    Sign up×
Community /Pin to ProfileBookmark

NEWBIE-Drop Down Menu Problem

Hello,

i have followed the steps to this tutorial – [url]http://javascript.internet.com/navigation/simple-drop-down-menu.html[/url]
and seem to be doing it wrong as i keep getting this –
[url]http://www.synnex.com.au/portals/0/content/promotions/WEB_Y704/WEB/images/menu/index_Y704a.htm#[/url]

what am i doing wrong!!

hope someone can help!

thanks!

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@rootApr 23.2007 — I can see a //--> HTML tag showing which means that your HTML is broken.
Copy linkTweet thisAlerts:
@aNdre-WApr 23.2007 — well having a quick look at you html i can see that:

A: You havent linked to the external css file correctly
[CODE]<script language="JavaScript1.2" src="file:///M|/Marketing/_MARKETING-NEW(USE-THIS)/Combined%20Artwork%20-Y5/MiTAC/mitac.com.au/WEB_Y704/WEB/mm_menu.js"></script>[/CODE]
That is trying to link to a .js file that dosent exist (you use 'file:///' whern you are linking to a file saved on your computer).

This means you have to upload it onto the internet and link to it.

B: You have stuffed your HTML tags up.
[CODE]<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
<script language="JavaScript">
<!--
function mmLoadMenus() {
if (window.mm_menu_0423100239_0) return;
window.mm_menu_0423100239_0 = new Menu("root",118,40,"Verdana, Arial, Helvetica, sans-serif",8,"#ffffff","#ffffff","#333333","#666666","center","middle",0,0,1000,-5,7,true,true,true,0,false,false);
mm_menu_0423100239_0.addMenuItem("desktop","window.open('http://www.mitac.com.au/products.html', '_blank');");
mm_menu_0423100239_0.addMenuItem("notebook","window.open('http://www.mitac.com.au/products.html', '_blank');");
mm_menu_0423100239_0.bgImageUp="mmmenu1_118x40_up.gif";
mm_menu_0423100239_0.bgImageOver="mmmenu1_118x40_over.gif";
mm_menu_0423100239_0.hideOnMouseOut=true;
mm_menu_0423100239_0.bgColor='#333333';

mm_menu_0423100239_0.writeMenus();
} // mmLoadMenus()

//-->
</script>[/CODE]

which is missing a </script> tag, so it becomes..
[CODE]<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
[B]</script>[/B]
<script language="JavaScript">
<!--
function mmLoadMenus() {
if (window.mm_menu_0423100239_0) return;
window.mm_menu_0423100239_0 = new Menu("root",118,40,"Verdana, Arial, Helvetica, sans-serif",8,"#ffffff","#ffffff","#333333","#666666","center","middle",0,0,1000,-5,7,true,true,true,0,false,false);
mm_menu_0423100239_0.addMenuItem("desktop","window.open('http://www.mitac.com.au/products.html', '_blank');");
mm_menu_0423100239_0.addMenuItem("notebook","window.open('http://www.mitac.com.au/products.html', '_blank');");
mm_menu_0423100239_0.bgImageUp="mmmenu1_118x40_up.gif";
mm_menu_0423100239_0.bgImageOver="mmmenu1_118x40_over.gif";
mm_menu_0423100239_0.hideOnMouseOut=true;
mm_menu_0423100239_0.bgColor='#333333';

mm_menu_0423100239_0.writeMenus();
} // mmLoadMenus()

//-->
</script>[/CODE]

notice the bold script tag i added in the middle there.

and thats all i can see.
Copy linkTweet thisAlerts:
@FangApr 23.2007 — Incorrect nesting of script tags&lt;script type="text/javascript"&gt;
// all JavaScript here
&lt;/script&gt;
Copy linkTweet thisAlerts:
@aNdre-WApr 23.2007 — Incorrect nesting of script tags&lt;script type="text/javascript"&gt;
// all JavaScript here
&lt;/script&gt;
[/QUOTE]


there you go ?
Copy linkTweet thisAlerts:
@rkhauthorApr 24.2007 — thanks everybodyfor your help!!
Copy linkTweet thisAlerts:
@aNdre-WApr 24.2007 — thanks everybodyfor your help!![/QUOTE]
thats why im here ? your much welcome.
×

Success!

Help @rkh spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...