Help! i need to make a bookmarks link for IE5+

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
regent
Beginner
Beginner
Posts: 2
Joined: Thu Oct 17, 2002 10:42 am

Help! i need to make a bookmarks link for IE5+

Post by regent »

Hi guru's!
I'm trying to modify a link in this menu_array.js so it will be a bookmark,
but i just cant make it work :(
I love this menu thing, its the best out there if the coders are reading this, wow, is all i can say!
Can you help me make a bookmark link?
i assume youll have to add a little function, or declare one...just cant get it.

thank you

Shai
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hello Shai,

I'm assuming that you want a menu item that, when selected, will let the user add the current page to IE's favorites menu. First, you'll need a function to open IE's favorites dialog. Like this:

Code: Select all

function add_to_favorites(fav_title)
{
  var fav_url = document.url;
  if (document.all) window.external.AddFavorite(fav_url, fav_title)
}
You could add the above function definition to the menu_array.js, before where your menus are defined. This function will open IE's "Add Favorite" dialog, with the URL of the currently dispayed page and whatever text label you pass in the fav_title parameter. Now you need a menu item that will call the function, like this:

Code: Select all

,"Bookmark this page","javascript:add_to_favorites('the text to use for favorite title')",,,1
This funciton will only work in Internet Explorer 4 or higher. I haven't tried it for ahwile, but I believe the document.all test will prevent the attempt for NS users (they can click the menu item, but nothing will happen).

Good Luck,

Kevin
regent
Beginner
Beginner
Posts: 2
Joined: Thu Oct 17, 2002 10:42 am

it works!

Post by regent »

:) thanks a lot kevin! it works great!

another minor question ...

is there some way to have the transparent menu's (which looks great) but lacking the 3D drop shadow effect? that would be neat.
I read a solution that includes Zeroing-out both Effect= (...strength) fields
can it be done in such a way there is no dropshadow/3d but that beautiful transparent to background effect? i hope so!

thank-you so much, this menu system is just wonderful.

Shai
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Again,

You'll find some lines at the top of your array.js file that define dynamic html effects. In one effects line, you can combine several individual effect functions, each separated from the next by a semicolon. This grouping approach yields a special overall effect that results from the individual functions running at once. If you want to remove an individual effect from the group, simply remove its function from the line that defines the group of effects. Many of the examples on the Milonic website use an effect like this:

Code: Select all

effect = "Fade(duration=0.5);Alpha(style=0,opacity=87);Shadow(color=777777, Direction=135, Strength=5)"
If you wanted to keep the fade and transparent effect, but lose the drop shadow, you could (a) change the Strength parameter in the Shadow() function to Strength=0, or (b) remove the Shadow function altogether. I favor the the first approach for testing, just to see what the result would look like (it's an easier edit). But for production, if I were to finally decide to drop the drop shadow, I would favor removing the function altogether, because there's really no sense having it run if it will not produce a visible effect. So, your effect line would become:

Code: Select all

effect = "Fade(duration=0.5);Alpha(style=0,opacity=87)"
(Note: I've changed Milonic's standard opacity=88 to opacity=87 in the examples above to prevent a smiley from appearing in this post.)

Hope that helps,

Kevin
Post Reply