Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:17
Maximum Size of Menu
Poster: markm
Dated: Monday August 25 2003 - 2:54:04 BST
Hi,
I am having a problem that appears to be related to the size of the menu item.
I am using standard HTML with tables inside a Menu Header but it only works up to a certain size and then simply cuts it off.
It is interesting to note that the HTML is OK when viewing the source but the actual output in the menu is missing.
Any help would be greatly appreciated, thanks.
regards,
Mark
PS - I have also tried breaking it up into smaller items but this seems to add blank lines above the menu - almost as if the HTML is badly formed - but it definitely isn't.
Poster: John
Dated: Monday August 25 2003 - 5:04:05 BST
Help will only come with a URL so we can see what's happening and get a look at your code. You have left us slightly in the dark here...
Poster: markm
Dated: Tuesday August 26 2003 - 7:46:24 BST
Hi,
It is very hard to send a URL as it is a dev site - our production site does not have the code in it yet - because we can't get it to work properly.
Here is the offending menu - I realise that the style and graphics will not work but if you can look at the code to see if you can offer any advice, it would be appreciated.
addmenu(menu=["quickinfo",25,0,144,0,"right",style3,1,"left",,1,,,,,,,,,,,
,'<table cellspacing=0 cellpadding=0 width=144 border=0><tr><td width=144><img src=imgSummaryWht.gif border=0><a href=/SiteDev/contentOMS/cs/CS04.asp?blnOR=False&blnORFull=False&vDate=37859.6798958333&vIP=192.9.200.195&strTab=K target=_self><img src=imgKeyTermsBlu.gif border=0></a></td></tr><tr><td class=KeyTerms width=144> <a href=/SiteDev/contentOMS/cs/cs02.asp?vDate=37859.6798958333&vIP=192.9.200.195&strTab=C target=_self>Persons Covered</a><br> <SPAN class=redtext>•</SPAN> Female 20-24</td></tr>','# type=header;',,'',0
,'<tr><td class=KeyTerms width=144> <a href=/SiteDev/contentOMS/cs/cs03.asp?vDate=37859.6798958333&vIP=192.9.200.195 target=_self>Cover Options</a><br> <a href=/SiteDev/contentOMS/cs/cs03.asp?vDate=37859.6798958333&vIP=192.9.200.195 target=_self><img src=imgAmbulanceWht.gif border=0 width=16 align=bottom> Excluded</a><br> <a href=/SiteDev/contentOMS/cs/cs04.asp?vDate=37859.6798958333&vIP=192.9.200.195 target=_self><img src=imgHospitalWht.gif border=0 width=16 align=bottom> </a></td></tr>','# type=header;',,'',0
,'<tr height=7><td width=144 class=KeyTermsBottom height=7> </td></tr></table>','# type=header;',,'',0
])
Poster: John
Dated: Tuesday August 26 2003 - 14:56:10 BST
Wow - quite a mouthful
Dave, you want to take a crack at this one?
No idea what flavor of HTML you're writing for (4.01, strict, transitional, XHTML, etc.), but I can tell you eventually you're going to run into trouble by leaving out all the soon-to-be-necessary quotes ("). All parameters are starting to be required to be quoted (try a validator and see what happens).
For instance...
Code:
<table cellspacing=0 cellpadding=0 width=144 border=0>
...should be...
Code:
<table cellspacing="0" cellpadding="0" width="144" border="0">
...and...
Code:
img src=imgSummaryWht.gif border=0>
...should be...
Code:
img src="imgSummaryWht.gif" border="0">
...etc. (don't forget the alt="whatever").
I'm not saying that's the problem here, but it will come back and bite you later as the browsers and W3C standards get tighter.
Poster: Hergio
Dated: Tuesday August 26 2003 - 20:21:10 BST
This just isn't gonna work, you cant do what you are trying to do. In HTML, when you create a table, it has a predefined signature about how it must be constructed. So for a table, to keep it short and sweet, its...
Code:
<table>
<tr>
<td></td> <!--as many columns as you need -->
</tr> <!--as many rows as you need -->
</table>
<tr>
<td></td> <!--as many columns as you need -->
</tr> <!--as many rows as you need -->
</table>
Anything that comes between these tags, will not get rendered, OR might get rendered but WILL screw up the table. When a </tr> tag occurs, it must be followed by another <tr> tag or a </table> tag, no exceptions. What you are doing is breaking a table up into menu items and this is problematic because the menu items themselves are comprised of certain div, span, and table tags and these are getting inserted around your table code, essentially breaking up your table code. And your table code is breaking up the menu's structure. Basically what you are doing is not possible and should be avoided. Also, I am unsure as to why are doing what you're doing because it looks like you are trying to make each menu item a cell in a table and give it style properties. Why would you do this when the menu can do this by putting an image in each item and you can assign a class to items too. If you want to do something like this, your table must begin AND end within each menu item, it can't span menu items. Hope this makes sense.