PDA

View Full Version : AnyLink Drop Down Menu Help



mshssca
08-09-2006, 09:30 PM
1) Script Title: AnyLink Drop Down Menu

2) Script URL (on DD): http://dynamicdrive.com/dynamicindex1/dropmenuindex.htm

3) Describe problem: I need more clarification on what to do with the following sample in order to make this menu work. I know that I should replace "Web Design" with my menu item's name, but is there anything else I need to modify? I'm thinking that the reason my code is not working is that I may need to change the "default.htm" to something else as well. I'm sorry, but I don't know much about code. I'm using Dreamweaver and only change very minor things in code.

<a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()">Web Design</a>

Any information would be greatly appreciated:)

jscheuer1
08-10-2006, 06:56 AM
You can change that default.htm to the name of a page that you would like non-javascript enabled browsers to go to if they click on the header. This is a nice feature of this menu because, the drop downs will not display in a non-javascript enabled browser. The page this link goes to can have a listing of the links that would have been available in the drop down.

bfisher
08-11-2006, 06:50 PM
What problem are you having? Did you include the required styles in your CSS? Are you getting Javascript errors?

mshssca
08-13-2006, 08:37 PM
Ok, I've got the drop down menus to finally work (that is to drop down). Now my problem is that I can't seem to get the drop down links to work. I get page cannot be found.

Below is a sample of my code. I was experimenting with menu7[0]. I have the file general.html ready to go and saved in me resources folder. What step am I missing?

//Contents for menu 7
var menu7=new Array()
menu7[0]='<a href="http://www.mshssca.org/resources/general">General</a>'
menu7[1]='<a href="http://www.mshssca.org/resources/goalkeeping">Goalkeeping</a>'
menu7[2]='<a href="http://www.mshssca.org/resources/physical">Physical</a>'
menu7[3]='<a href="http://www.mshssca.org/resources/psychological">Psychological</a>'
menu7[4]='<a href="http://www.mshssca.org/resources/tactical">Tactical</a>'
menu7[5]='<a href="http://www.mshssca.org/resources/technical">Technical</a>'

<td><p><font color="#FFFFFF">Home </font></a><font color="#COCOFF"> |<a href="mshssca.html" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()"><font color="#FFFFFF">The MSHSSCA</font></a><font color="#COCOFF"> | <a href="coaches.html" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu2, '150px')" onMouseout="delayhidemenu()"><font color="#FFFFFF">Coaches</font></a><font color="#COCOFF"> | <a href="players.html" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu3, '150px')" onMouseout="delayhidemenu()"><font color="#FFFFFF">Players</font></a><font color="#COCOFF"> | <a href="conferences.html" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu4, '150px')" onMouseout="delayhidemenu()"><font color="#FFFFFF">Conferences</font></a><font color="#COCOFF"> | <a href="tournament.html" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu5, '150px')" onMouseout="delayhidemenu()"><font color="#FFFFFF">State Tournament</font></a><font color="#COCOFF"> | <a href="recognition.html" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu6, '150px')" onMouseout="delayhidemenu()"><font color="#FFFFFF">Recognition</font></a><font color="#COCOFF"> | <a href="resources.html" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu7, '150px')" onMouseout="delayhidemenu()"><font color="#FFFFFF">Educational Resources</font></a> &nbsp;</p>
</td>

jscheuer1
08-13-2006, 09:42 PM
When I paste this:



http://www.mshssca.org/resources/general

directly into the address bar, I get a 404 page not found.

mshssca
08-13-2006, 09:54 PM
none of these pages are live as this is a new site for the association. no pages have been uploaded. that's the same error I get. does the code look correct to the best of your knowledge?

jscheuer1
08-13-2006, 10:06 PM
No, if you want to link to 'general.html' you need to have it in the href. You only list 'general'.

mshssca
08-13-2006, 10:12 PM
Thanks but can you please give me a typed example. I'm not following.

jscheuer1
08-14-2006, 03:10 AM
menu7[0]='<a href="http://www.mshssca.org/resources/general.html">General</a>'

And that's assuming that there are no other errors.

mshssca
08-14-2006, 04:13 AM
Thanks. I've tried that and it still didn't work. Can I assume that I will not be able to view the page unless I FTP it since it says page not found?

jscheuer1
08-14-2006, 05:14 AM
I can't really go much further without seeing the entire code and markup, live or as text. This is really a rather simple menu, perhaps something else is at the root of your trouble. If they drop down as you say, then your links are invalid or somehow obscured from the browser due to styling or both. Invalid, most likely. To test the validity of any link in your menu, copy the href (red in the below example from your post):


//Contents for menu 7
var menu7=new Array()
menu7[0]='<a href="http://www.mshssca.org/resources/general">General</a>'
menu7[1]='<a href="http://www.mshssca.org/resources/goalkeeping">Goalkeeping</a>'
menu7[2]='<a href="http://www.mshssca.org/resources/physical">Physical</a>'
menu7[3]='<a href="http://www.mshssca.org/resources/psychological">Psychological</a>'
menu7[4]='<a href="http://www.mshssca.org/resources/tactical">Tactical</a>'
menu7[5]='<a href="http://www.mshssca.org/resources/technical">Technical</a>'

and, paste it into the browser's address bar. If you get the page you are looking for, it is a valid link, otherwise, there is a problem with the link. By the way, these links should be exactly the same as ordinary links on your page, I mean, if this won't work:


<a href="http://www.mshssca.org/resources/general">General</a>

alone on the page, it won't work in the menu either.

mcgmark
08-14-2006, 05:13 PM
Thanks. I've tried that and it still didn't work. Can I assume that I will not be able to view the page unless I FTP it since it says page not found?

Sorry to step in,

You will definately not be able to view the page unless you upload (ftp) the file to your server.

If you are getting the drop down menu and are able to click the link but you are seeing 'Page not Found' yes your script is working but you need to either upload the file to the server OR fix your links.

You also *MUST* have a extension on your files that match the extension of the file you are uploading.
With no extension your browser will be trying to load a directory.
And without the proper extension the file will not load.

sharmin
08-14-2006, 06:34 PM
Thanks. I've tried that and it still didn't work. Can I assume that I will not be able to view the page unless I FTP it since it says page not found?

just put normal links like:

http://www.yahoo.com
http://www.google.com

or make some pages in dreamweaver, say index.htm or index2.htm,

and ahref to index1.htm or index2.htm.

i think that those other webpages that you cannot access does not have any valid domin name.

But definity, DD's script is right.

sharmin
08-14-2006, 06:37 PM
Thanks. I've tried that and it still didn't work. Can I assume that I will not be able to view the page unless I FTP it since it says page not found?

just put normal links like:

http://www.yahoo.com
http://www.google.com

or make some pages in dreamweaver, say index.htm or index2.htm,

and ahref to index1.htm or index2.htm.

i think that those other webpages that you cannot access does not have any valid domin name 9 i typed in google they don't access so that script can access and show it in browser. Try with yahoo or your own htm/ html file.

But definity, DD's script is right.