View Full Version : AnyLink DropDown Menu

05-13-2008, 08:15 AM
1) Script Title:

AnyLink DropDown Menu

2) Script URL (on DD):


3) Describe problem:


The above is a testing page for a site I am doing for a friend. The script in question is being used on the CONTACT link. Where it says Mailing Address, is it possible to do an onClick open browser window?

I have tried the following, with no luck...

<a href="#" onClick="MM_openBrWindow('address.html','','width=160,height=160')">

05-13-2008, 08:51 AM
I think you are talking about where, at the moment, you have this:

menu5[1]='<a href="#">Mailing Address</a>'

Since you are using ' to delimit the link string, if you use ' inside it, you must escape it:

menu5[1]='<a href="#" onclick="MM_openBrWindow(\'address.html\',\'\',\'width=160,height=160\');return false;">Mailing Address</a>'

And you should return false if you don't want the default link behavior ("#" in this case, which reloads to the top of the page in many browsers).

You could also do it like so:

menu5[1]="<a href=\"#\" onclick=\"MM_openBrWindow('address.html','','width=160,height=160');return false;\">Mailing Address</a>"

which is a little easier on the eye.

05-13-2008, 09:08 AM
Cheers, mate...

One problem fixed. Whereas what I did caused the entire script to not work, what you suggested does not.

But when I click on Mailing Address, nothing happens.

05-13-2008, 09:22 AM
I don't see that you've changed anything on your test page. And even when you do:


won't do anything if it isn't valid and available to the page.

You could try it with the native window.open():

menu5[1]="<a href=\"#\" onclick=\"window.open('address.html','','width=160,height=160');return false;\">Mailing Address</a>"

05-13-2008, 05:12 PM
Great, window.open() worked perfectly.

Thanks a ton, man...

BTW, yeah, I had changed it but forgot to upload it to the web server...