Linking Menu to Local file/folder

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Inphluence
Beginner
Beginner
Posts: 3
Joined: Tue Nov 24, 2009 11:11 pm

Linking Menu to Local file/folder

Post by Inphluence »

Hello,

I'm trying to link a few of my menus to a local file or folder.

with(milonic=new menuname("Media")){
style=menuStyle;
aI("text=DVDs;url=C:\Documents and Settings\All Users\DVDs;");
aI("text=Music;url=C:\Documents and Settings\All Users\Music;");
}

So the above link ends up coming up as a page cannot be displayed. I'm not doing anything more than just opening a folder on a drive and/or linking to a Excel sheet to pull up.

Thanks in advance.

JJ
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Re: Linking Menu to Local file/folder

Post by Andy »

Hi,

You'll need to use the file protocol for linking to local files, so change C:\ to file:///c:/

Also, note that we need to swap the \ character for the / character

Here's how you can do this:

Code: Select all

with(milonic=new menuname("Media")){
style=menuStyle;
aI("text=DVDs;url=file:///c:/Documents and Settings/All Users/DVDs;");
aI("text=Music;url=file:///c:/Documents and Settings/All Users/Music;");
}


HTH,
Andy
Inphluence
Beginner
Beginner
Posts: 3
Joined: Tue Nov 24, 2009 11:11 pm

Re: Linking Menu to Local file/folder

Post by Inphluence »

OMG Andy, I love you!

I scoured the net all day yesterday with everyone saying that you can't do it. Your support alone was worth the price of admission, thank you sir!

JJ
Post Reply