View Full Version : AnyLink Drop Down Menu

07-12-2005, 12:14 PM

I've tried to get this going for a while now and have no idea why it isn't working. Is it because you need your whole site to be CSS or something?


Ignore the code in the main content part - it is just a 'backup'. :)

I found this script and thought it would greatly help me reduce the length of the links in the sidebar.

I really need a massive re-do of the whole site (to update it i have to update *every* single page which takes far too long) but can't afford to pay anyone to do it. :(

07-12-2005, 12:33 PM
You can use css in bits and pieces or base your entire site on external stylesheets. Css is just for style (layout and appearance), you still need HTML for substance (content). Anyways, you've deviated so far from how this script is supposed to be installed that it is no wonder you are having problems with it. Example:

<p>#dropmenudiv{ position:absolute; border:1px solid black;
font:normal 10px Arial; line-height:18px; z-index:100; }
#dropmenudiv a{ width: 100%; display: block; text-indent: 3px; }
#dropmenudiv a:hover{ /*hover background color*/
background-color: #8FA9B1; } </style>from your code. Nowhere does it say to do that. Try starting over, on a blank page if need be. Follow the step by step instructions.

07-13-2005, 05:10 AM

All i did was copied and pasted the code into where the instructions said - i haven't modifed them a bit, but the link menu appears at the top of the page instead of under the text?

And http://www.gtseriescenter.com/main3.htm doesn't even load up for me now. :(

07-13-2005, 05:20 AM
If what you say is true, and please forgive my skepticism as it just doesn't look that way, then your editor, upload manager and/or host must be modifying the content without your knowledge. If that is the case, use a plain text editor to insert the code and upload via FTP. That will at least eliminate two out of three possible sources of unintended changes.

07-13-2005, 06:06 AM
Host: www.netfirms.com
FTP: FTP Commander v7.40
WYSIWYG Editor: Microsoft Frontpage Express (really old :()

After your suggestions:


<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Gran Turismo Series Center</title>

<body bgcolor="#991E1E" text="#FFFFFF" link="#C0C0C0"
vlink="#808080" alink="#FF0000">
<div align="center"><center>

<table border="0" cellpadding="0" cellspacing="0" width="99%"
<td align="center" colspan="3" width="70%"><a name="TOP"></a></td>
</center></div><div align="center"><center>

<table border="1" cellspacing="0" width="99%" bgcolor="#2E396D"
<td align="center" valign="top" colspan="3"><a
href="index.htm"><img src="logo.jpg"
alt="Gran Turismo Series Center - Main page" border="0"
width="500" height="70"></a></td>
<td align="right" valign="top" width="20%"
bgcolor="#45597A"><font size="2" face="Arial"><strong><br>
</strong></font><a href="1about.htm"><font size="1"
Code (of index.htm) before the changes.

07-13-2005, 06:35 AM
I am not sure I understand you. One thing:

WYSIWYG Editor: Microsoft Frontpage Express

Is not a plain text editor, use Notepad if you have no better plain text editor. Another thing, the source of the page at:


Was either incomplete when you wrote it, or has been truncated (cut off) by some agent (editor, host and/or upload client) you are using. It doesn't resemble, in any way, the code snippet in your post, which itself contained no script at all.

My suggestion would be to get the page working locally using a plain text editor and then upload it using your ftp client (I have no knowledge of the ftp client you mentioned, just make sure all the settings are correct).

07-13-2005, 08:43 AM
Sorry i was having computer problems - will upload it again.

And to clarify, the main2.htm was modified in Notepad like you suggested.
Also, i posted the code above to show what the page looks like without this code added to it - just in case there was something wrong.

07-13-2005, 08:50 AM
Okay, that actually worked. :) Will try it again by using Frontpage.

EDIT: Must be Frontpage then. Did the exact same thing as i did with Notepad: http://www.gtseriescenter.com/main4.htm

Do you have any idea why it would be doing this?

And to get this code on every single page (out of fourty something) would i have to copy and past the code in each page - or is there an easier way?

07-13-2005, 09:07 AM
I hate FP, no actually I used to hate it, now I just avoid it. FP has various settings, and of course these probably vary from version to version as to exactly how you work with them, that control things like how scripts and other content are handled. I think it is possible to turn off some or all of the behaviors that alter these things and have FP only use the code as written but, I am not sure how to do it and if all, or only some of these behaviors can be changed.

07-13-2005, 09:16 AM
Yeah i just looked at the code, and FP seems to add a few unwanted tags (like < P >), removes all the code from the head section and then just randomly places the code below it. o_O

That is just great. It already takes way too long to update the site in FP, now it will taken even longer to do so with Notepad. If i can even manage it. :(

There is no preferences/options menu with the FP version i have either. I want to buy a brand new version of it, but just can't afford to.

Any suggestions on what to do? If this can't be sorted out then i'll have to just scrap the idea.

EDIT: And thanks so much for all your help so far mate. :)

07-13-2005, 09:24 AM
I forgot to answer your other question. You can put this script into external files and link them to each page but, it is a little complicated, especially if you have no experience doing so with simpler scripts. Here are the basics:

Take the style part of the script, remove the opening and closing style tags and put the remaining code in a file called anylink.css. Take the script part of the code, remove the opening and closing script tags and place the rest in a file called anylink.js.

Put these two statements in the head of each page you want this menu on:

<link rel="stylesheet" href="anylink.css" type="text/css">
<script src="anylink.js" type="text/javascript"></script>The external script and stylesheet files must be in the same directory as the page(s) that use them or have their paths included in the src and href attributes. You will still need to paste in the HTML markup to each page. It's content can be converted to a separate script (using document.write) but, generally this is a bad idea, it is complicated and the markup won't be available for non javascript enabled browsers. If this script is used as intended, said markup will be able to be used for some bare bones navigation even by non javascript enabled browsers. If you get the first two working and want to try for the third anyway, let me know.

07-13-2005, 09:31 AM
I feel like I am in a chat room here . . .

Anyways, I use Edit Pad Pro. It is a text only editor that has very powerful features like syntax highlighting and global search and replace across multiple files plus many more. It will also launch your work in the browser for preview. Once loaded in the browser you can just refresh it to see any changes being made. There are other editors of this type, that's just the one I use. There are also other WYSIWYG editors, some of which will not mess with your code like FP. All the ones I've tried have had drawbacks so I gave up and went the text only route.

07-13-2005, 09:37 AM
Ah. Thank you. I'll try out some things when i get time and let you know how they went. :)

07-20-2005, 02:00 AM

I think that has been done like you said (with the .css and .js pages uploaded too). Nothing seems to have happened though.

I think all this is just way over my head (unfortunately, as i really need to improve my website) so might just have to leave it sorry. :( I'd pay someone to make a site for me, but i can't forsee any time when i'll actually be able to afford to do this.

Thanks for all your help anyway. :)