Menu embeded in table ignoring scrolling=1

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
Derek Fielding
Super Advanced
Super Advanced
Posts: 30
Joined: Thu Jan 15, 2004 12:20 pm
Location: UK

Menu embeded in table ignoring scrolling=1

Post by Derek Fielding »

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?
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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
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 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
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
User avatar
Derek Fielding
Super Advanced
Super Advanced
Posts: 30
Joined: Thu Jan 15, 2004 12:20 pm
Location: UK

Re: No scroll when in table

Post by Derek Fielding »

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: No scroll when in table

Post by John »

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/templat ... p_data.cfm for the data file.

Note they used to be set up to scroll, but I have removed that. You can add...

Code: Select all

followscroll = "1,100,2";
...to your main menu definition to get that back.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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://milonic.com;image=w3.gif;url=http://whatever.com;");

Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

I may easily have mis-read it, Ruth. We'll see what his reply is.
John
User avatar
Derek Fielding
Super Advanced
Super Advanced
Posts: 30
Joined: Thu Jan 15, 2004 12:20 pm
Location: UK

Post by Derek Fielding »

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://milonic.com;separatorsize=0")
aI("image=gif/v4.gif;url=http://validator.w3.org;separatorsize=0")

Can this be done?

Thanks

Derek
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Derek -

I think I'm still going to refer you to the links I posted originally. This code...

Code: Select all

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: Select all

aI("image=jpg/milonic.jpg;url=http://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... :?
John
User avatar
Derek Fielding
Super Advanced
Super Advanced
Posts: 30
Joined: Thu Jan 15, 2004 12:20 pm
Location: UK

Post by Derek Fielding »

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://milonic.com;");("image=gif/v4.gif;url=http://validator.w3.org;separatorsize=0;");

I hope I have better explained what I need

Thanks

Derek
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
John
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 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: Select all

aI("text=<a href="http://websites.milonic.com/milonic.com/' title='Menu Provider'><img src='milonic.jpg' border=0 align='left'></a> <a href="http://websites.milonic.com/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
User avatar
Derek Fielding
Super Advanced
Super Advanced
Posts: 30
Joined: Thu Jan 15, 2004 12:20 pm
Location: UK

Post by Derek Fielding »

: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
Post Reply