Width of vertical menu in table

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Navigation and Site news are outside the menu, so it seems the menu is not loading at all on the mac ie. Going for a nap, ya'll take care.

Ruth
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Now I'm getting a javascript syntax error line 1.


You still need to change this:

<SCRIPT language=JavaScript src="../menus/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
   if (parent.frames.length) { top.location=document.location;}
   if(ns4)_d.write("<scr"+"ipt language=JavaScript src=../menus/mmenuns4.js></scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=../menus/mmenudom.js></scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="../menus/menu_data.js" type=text/javascript></SCRIPT>

To this:

<SCRIPT language="JavaScript" src="/menus/milonic_src.js" type="text/javascript"></SCRIPT>
<script language="JavaScript">
   if (parent.frames.length) { top.location=document.location;}
   if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/menus/mmenuns4.js></scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/menus/mmenudom.js></scr"+"ipt>");
</script>
<SCRIPT language="JavaScript" src="/menus/menu_data.js" type="text/javascript"></SCRIPT>

For example on your menu_data.js

in the paths you have "../menu/image.gif";
change to "/menu/image.gif";

I don't know where you introduced the syntax error.

maz
Arcady
Advanced
Advanced
Posts: 15
Joined: Fri Mar 19, 2004 7:44 am
Contact:

Post by Arcady »

Okay, I changed the script and got rid of the .. stuff, but it still won't load in Mac IE. Where are you seeing the javascript error?
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,

We should swap tasks, I'm getting lost on forums and you on menu.

Where's Kevin, Andy, someone who knows js?

I tried Firebird w3 validation but you don't have enough doc tags to get any results. Then the page wouldn't come up in IE, probably because you were working on it, so I checked js console instead and thats where the error showed.

Now you have paths correct I'll see if I can find anything. If ie is having a js conflict I wouldn't know, perhaps someone else can have a look.

Okay, here's just detail stuff, but I'm wondering if your js .src is interfering with milonic src.

aI("text= SG-1 Info;url=http://www.sg1archive.com/sg1/;showmenu=SG1");
aI("text= Atlantis Info;url=http://www.sg1archive.com/atlantis/;showmenu=Atlantis");

I would add a ; at the end of each line before the last "

This could be something:

};
drawMenus();

make it this without that semicolon:

}
drawMenus();

Have you looked up details for frames, you have if parent frames, unless you have checked info on frames it can cause problems. But most likely it wouldn't be working at all if that was it.

Okay here is where mac ie gets confused, it doesn't like the quotes on those single dimensions:

padding=5;
separatorsize=1;
subimagepadding=1;
borderwidth=0;

..............
or take out what you don't need.
fontstyle="normal";
borderwidth=0;
bordercolor & borderstyle unless you are still using those, thought you were using a border.

You can make a new submenu style by copying the style, changing the style name in style and menu style=, maybe after you got it working;)

You could probably even make the portal work with the same menu without extra js.

Your urls can also start with a slash from the root /s1.shtml but that's your choice to have full urls.
.....

Unless I missed something or its js related, it should be working with those fixes.

maz
Arcady
Advanced
Advanced
Posts: 15
Joined: Fri Mar 19, 2004 7:44 am
Contact:

Post by Arcady »

I did a whole bunch of stuff, including all your suggestions, and now it is working! (It's a royal pain to make it look similar in Windows IE, Mac IE and Safari - which I use.) It still looks just a bit "off" in Mac IE, but if it works, then the 10 people out of 10 million that use Mac IE can get by.

I still have some fiddling to do (gotta be careful, seems like a single error will make Mac IE puke) but I'm pretty much set to send in my money and put this live on my site!

Note for future Mac IE problems: the stupid thing caches like a nightmare. I had to keep closing the app and re-launching it to make it see simple changes to the menu. I never did get itemwidth="100%" to work in it either - it makes it wider than the browser window in IE with that, so I had to set a specific item width.

Thanks to everyone for your kind support. I hope the users on my site like this change as much as I am liking it so far. :D
Arcady
Advanced
Advanced
Posts: 15
Joined: Fri Mar 19, 2004 7:44 am
Contact:

Post by Arcady »

Okay, maybe I spoke too soon. It looks like it screws up still in Mac IE, making itself wider than the browser window, then if you reload it looks right.

Mac IE is the worst pile of junk ever created! :evil:
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Great, finally!

Ie is a pain, fortunately most will be using Safari.

Looks good, you might want to add a border now to submenus, you could now copy the main menu style and rename it submenu, and change the style name on the submenus.

There is also another way to say copyof mainmenu style and then just add to it. You'll probably see that done on the milonic site.

Now you have a basic menu working you could do all kinds of things like I was saying you can plot your graphics and create more menu links.

Its best to test each step ready to undo if it disappears.

maz
Arcady
Advanced
Advanced
Posts: 15
Joined: Fri Mar 19, 2004 7:44 am
Contact:

Post by Arcady »

Maz wrote:Looks good, you might want to add a border now to submenus, you could now copy the main menu style and rename it submenu, and change the style name on the submenus.
So I went ahead and tried that. Now IE is broken again (and I did save my original menu_data file, so I don't get it. I pasted the same exact stuff back in and it won't load at all now.) If this thing is going to break every time I breathe wrong, maybe I should look for something else.

:|
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Its working fine and your borders. Use shift and reload to make sure you get the new version.

Now you can get remove borders and fontstyle on menustyle.

No quotes needed on padding & subimagepadding.

with(menuStyle=new mm_style()){
onbgcolor="#547CBB";
oncolor="#ffffff";
offbgcolor="#E7EBF7";
offcolor="#000000";
separatorcolor="#ffffff";
separatorsize=1;
padding=5;
fontsize="7.5pt";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="#ffffff";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="/menus/arrow.gif";
subimagepadding=2;
overfilter="Fade(duration=0.2);Alpha(opacity=90)";
outfilter="randomdissolve(duration=0.3)";
}

with(menuStyle1=new mm_style()){
onbgcolor="#547CBB";
oncolor="#ffffff";
offbgcolor="#E7EBF7";
offcolor="#000000";
bordercolor="#296488";
borderstyle="solid";
borderwidth=1;
separatorcolor="#ffffff";
separatorsize=1;
padding=5;
fontsize="7.5pt";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="#ffffff";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="/menus/arrow.gif";
subimagepadding=2;
overfilter="Fade(duration=0.2);Alpha(opacity=90)";
outfilter="randomdissolve(duration=0.3)";
}

It gets easier once you get the hang of it.

maz
Arcady
Advanced
Advanced
Posts: 15
Joined: Fri Mar 19, 2004 7:44 am
Contact:

Post by Arcady »

Okay, I got borders working and I even solved the IE Mac issue (the menu_data file was in UTF-8 encoding or something).

Now I have begun to add onfunction and offfunction stuff and it's still working great!

I have one question though: When I look at the menus in IE 6 on Windows, there is some transparency to them. Is this not implemented on Safari or Mac IE? It looks especially neat on this test page: http://www.sg1archive.com/store2.shtml

Thanks again to everyone for all the help. I'll be purchasing this menu as soon as I can find some more spare change in the couch. :)
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Maz wrote:...Where's Kevin, Andy, someone who knows js?
Out sick... bad cold ruined my whole weekend and then some. Looks like you guys got it figured out just fine.

Couple of general notes:

(1) Maz pointed this out on severl properties. In general, any property that is a numeric should be assigned as such, without double or single quotes around the value. I.e.,

Code: Select all

itemwidth="110";
should be

Code: Select all

itemwidth=110;
In most cases, the browser's implementation of javascript should automatically "cast" the value from a string (in quotes) to a numeric value when the property is used in a numeric context. But some crappy browsers may have some difficulty with that. I notice, Arcady, that you are assigning double-quoted (string) values to menuwidth and itemwidth in your Main Menu. Might want to remove the quotes.

(2)
When I look at the menus in IE 6 on Windows, there is some transparency to them.
That's because of the

Code: Select all

Alpha(opacity=90)
part of the overfilter definition in your menuStyle1. You're basically telling any menu that uses that style to be 10% transparent. A cool effect, but it'll only work in IE5.5+ on Windows.

I was wondering, in all this messing around with table-bound menu, did you try taking the menu out of the table and just positioining it horizontally using an offset from center? That might take away some of the headaches brought on by tables.

I agree with the others... nicely designed site.

Cheers,

Kevin
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Glad to see you back Kevin, I was ill all last week.

Besides the IE flashbacks, looks like it was small stuff. You can't leave all the js to Ruth, although she does try:)

I didn't want to confuse Arcady, there was nothing wrong with the implementation of the table, it was just not showing up in IE. Since the top and bottom item is the table and not the menu it wouldn't work, unless Arcady wants to add those links to the menu and style them.

Then everything would go back into menu_data.js keeping the script where it is, removing relative and replacing it with top= ; left= ;

Then the menu would sit in the same position on every page with the scripts under the body tag. Its easier to work. You can add more menus just by giving them another name and different position on the page, without worrying about changing the layout.

Anyway I think Arcady got his wings ready to move on to the next portal :P

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

Post by John »

Glad to hear it. Nice work, you two!

Was just about to dig into it on Safari, but it's past my bed time (been working on the new site).
John
Arcady
Advanced
Advanced
Posts: 15
Joined: Fri Mar 19, 2004 7:44 am
Contact:

Post by Arcady »

Okay, I thought I had figured out how to enable a mouseover in the menu, but I am getting an error in Windows IE (it worked in Safari though.)

Here's the old original html:
<a href="/forums/" OnMouseOut="return CloseChevron(8)" OnMouseOver="return ForumsChevron(8)">SG-1 Forums</a>

Here's what I put in for the menu:
aI("text=&nbsp;Forums;url=http://www.sg1archive.com/forums/;offfunction=return CloseChevron(8);onfunction=return ForumsChevron(8);");

Why won't it work in Windows IE? I'm getting an error when I mouse over that menu item.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I think you don't put the word return in there. At least when I removed that it and tried it on the desktop I got no error, I just got the word Forum when I moused over and it went away when I moused off

Ruth
Arcady
Advanced
Advanced
Posts: 15
Joined: Fri Mar 19, 2004 7:44 am
Contact:

Post by Arcady »

That's it! Now I can rebuild my funky Stargate to light up with my cool new menu.

Thanks! :)
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

I knew you would take off into that stargate, good luck on your next encounter :P

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

Post by John »

Please - take us with you... :!:
John
Post Reply