Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:43

Menu embeded in table ignoring scrolling=1


Poster: Derek Fielding
Dated: Wednesday February 11 2004 - 20:34:53 GMT

I have taken the code from the Milonic site to embed the main menu in a table cell on http://www.dfielding.co.uk/index.html
The menu works OK but although followscroll is set to followscroll=1; the menu scrolls off the screen. Do I need more or diferent code to make this work?


Poster: Maz
Dated: Wednesday February 11 2004 - 21:39:34 GMT

Hi,

Its not scrolling at all when I looked at it, although I've seen your menu before and it did scroll then.

The position of your menu would be:

top=250;
left=3;
followscroll="1";
screenposition="top;left";

You could take the menu out of the table, put all the codes just under <body> and it would probably work nicely.

I never embed in a table if I can avoid it, I think this would work better for you.

You may want to just use screenposition="top"; I think left is its normal position.

regards,
maz


Poster: kevin3442
Dated: Thursday February 12 2004 - 6:47:58 GMT

Hi Derek,

I don't know if you can use followscrolling on a menu embedded in a table. To me, they don't seem to fit together logically... most folks would resort to putting the menu in a table to lock it into place relative to the other content on the page. Why would you position a menu in a table, but want it to follow scrolling? I'm nt saying there's no valid reason to do so... I just can't think of one. I think Maz has a good suggestion... I'd take it out of the table. With your page layout, you should be able to put the menu where you want it without embedding it in a table (which has caused other weird things to happen for various people).

If you need help using the built-in positioning, just holler.

Kevin


Poster: Ruth
Dated: Thursday February 12 2004 - 10:09:40 GMT

The position when placing it in a table is relative and the follow scroll doesn't work, at least I've never been able to get it to work. I have when I need to put it in a table for some reason or need it fixed in place, made a small button on the left side that says menu, is coded to follow scroll and when clicked takes you back to the menu.

Ruth

Re: No scroll when in table


Poster: Derek Fielding
Dated: Thursday February 12 2004 - 10:32:34 GMT

Thanks to all for your replies.
The reason I tried putting the menu in the table was that I was having trouble with the page layout when viewed in Netscape 4.7
Putting the menu in the table did actually cure my problem but as you know left me with another.
I have now reverted to the standard menu positioning so the scroll works OK again and I have found the cure for the Netscape problem.

On http://www.dfielding.co.uk/index.html I have 2 Icons with links, Milonic & WC3, positioned side by side above the menu.
I would like to include these items & links as the top line of the menu so that they will scroll with the menu. (Both items side by side on one line). Does anyone know if this is possible?

Derek

Re: No scroll when in table


Poster: John
Dated: Thursday February 12 2004 - 14:45:02 GMT

Derek Fielding wrote:
On http://www.dfielding.co.uk/index.html I have 2 Icons with links, Milonic & WC3, positioned side by side above the menu.
I would like to include these items & links as the top line of the menu so that they will scroll with the menu. (Both items side by side on one line). Does anyone know if this is possible?

Right now I'm not seeing any links off those 2 icons, but yes, it is possible. See http://westcgi.west.asu.edu/sai/ for the page (all 6 of those menu items are individual graphics), and http://westcgi.west.asu.edu/sai/templates/menu5/xp_data.cfm for the data file.

Note they used to be set up to scroll, but I have removed that. You can add...
Code:
followscroll = "1,100,2";

...to your main menu definition to get that back.


Poster: Ruth
Dated: Thursday February 12 2004 - 15:09:13 GMT

I think, John, what he wants is to be able to do is keep the vertical menu and put the two images each with it's individual link in one aI at the top of it above the other vertical links. And, i know the next isn't correct...well I don't think it can be, but I think this is in effect what he wants to do.

aI("image=milonic.jpg;url=http://www.milonic.com;image=w3.gif;url=http://whatever.com;");

Ruth


Poster: John
Dated: Thursday February 12 2004 - 15:12:51 GMT

I may easily have mis-read it, Ruth. We'll see what his reply is.


Poster: Derek Fielding
Dated: Thursday February 12 2004 - 15:50:50 GMT

Yes, Ruth has understood my request.

I need to combine the 2 lines of code shown below so that the graphics appear together on the same line and their individual links are called when clicked.

aI("image=jpg/milonic.jpg;url=http://www.milonic.com;separatorsize=0")
aI("image=gif/v4.gif;url=http://validator.w3.org;separatorsize=0")

Can this be done?

Thanks

Derek


Poster: John
Dated: Thursday February 12 2004 - 17:24:18 GMT

Derek -

I think I'm still going to refer you to the links I posted originally. This code...
Code:
with(milonic=new menuname("XPMain")){
style=XPMainStyle;
top = 78;
left = 0;
alwaysvisible = 1;
orientation = "horizontal";
aI("image=/sai/graphics/home.jpg;showmenu=home;url=http://westcgi.west.asu.edu/sai/;");
aI("image=/sai/graphics/staff.jpg;showmenu=staff;");
aI("image=/sai/graphics/tech.jpg;showmenu=tech;");
aI("image=/sai/graphics/edit.jpg;showmenu=edit;");
aI("image=/sai/graphics/services.jpg;showmenu=services;");
aI("image=/sai/graphics/about.jpg;showmenu=about;");
}

...places the six individual graphics horizontally and calls sub-menus and/or links.

Your code would actually be...
Code:
aI("image=jpg/milonic.jpg;url=http://www.milonic.com;separatorsize=0;");
aI("image=gif/v4.gif;url=http://validator.w3.org;separatorsize=0;");

Note the 2 additional ; towards the end of each line (all of your aI statements should end like that).

If I'm still missing it I'm going over to Maz' place for a rest... :?


Poster: Derek Fielding
Dated: Thursday February 12 2004 - 17:49:07 GMT

Hi John,

I dont think the code you suggest will do what I want. Ruth was exactly right when she said I want to keep my vertical menu but have 2 links within the same aI so that they appear on the same line of a vertical menu
The finished code could look something like this
aI("image=jpg/milonic.jpg;url=http://www.milonic.com;");("image=gif/v4.gif;url=http://validator.w3.org;separatorsize=0;");

I hope I have better explained what I need

Thanks

Derek


Poster: John
Dated: Thursday February 12 2004 - 20:45:41 GMT

Derek -

Here's what I have so far...
http://www.west.asu.edu/sa/testsite/redeemer.htm. The _data is at...
http://www.west.asu.edu/sa/testsite/redeemer_data.js.

The main problem is you are trying to combine a horizontal (the images) and a vertical (the text) menu into one, and that cannot be done. I have taken the graphics and combined them into one item. The next problem is getting an imagemap on to the graphic. Unfortunately, I have to get back to the J.O.B. right now.

Feel free to grab the files from my server. You will note a number of corrections I have made to the HTML (syntax - mostly missing ""). I also put all the menu code back into one file.

I'll try to get back to it later, unless somebody else can get a map on that graphic.


Poster: kevin3442
Dated: Thursday February 12 2004 - 22:09:20 GMT

Hi Derek,

Well I'm thinking that you can just poke both images on one line with some plain ol' html. ("poke"... that's a technical term).

Add a new item to the top of your "mainmenu". The code for this item should be as follows (all on one line, though it'll no doubt wrap in the example below):
Code:
aI("text=<a href='http://www.milonic.com/' title='Menu Provider'><img src='milonic.jpg' border=0 align='left'></a> <a href='http://validator.w3.org/' title='Page code validated'><img src='v4.gif' height=25 border=0 align='right'></a>;type=header;headerbgcolor=black;");

The reason for making it type=header is to prevet the menu system from wanting to do something itself with this item. That way, we can "poke" some plain ol' <a> tags in there. The reason for the headerbgcolor is to override the "blue" setting you use in style1, so that your header's background is the same as the rest of the menu. You could, however, experiment with different background colors and borders around this item, to separate it visually from the nav part. I tried it in IE4.01, 5.01, 5.5, and 6, Opera 6.05 and 7.2, and NS7.1 all in WIn2k and it worked (I'll leave it to you to try NS4 ;) ).

Hope that helps,

Kevin


Poster: Derek Fielding
Dated: Friday February 13 2004 - 4:02:33 GMT

:D
Thanks very much to all who helped me with this.
Kevin was spot on and I have used his line of code with a small mod to give separation between the icons and the rest of the menu.

I have uploaded the latest version of the page to http://www.dfielding.co.uk/index.html and the code is in http://www.dfielding.co.uk/js/menu_data.js

As you will have gathered I am no expert but I am learning all the time.

Thanks again

Derek