Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript menu placement

Status
Not open for further replies.

l79

Technical User
Joined
Nov 4, 2003
Messages
2
Location
CA
I'm kind of new to javascript and need some help.

I have a drop down menu made in javascript, that I want to place inside a table cell, <td> tag. Or table row tag.

I manually placed it in there, and when i uploaded it, it disapeared. How do i make it so it shows up inside a cell?

My goal: I need the menu to move like the table will, when the browser is resized.

Thanks in advance
 
//Thanks for the reply, here is the menu array


menunum=0;menus=new Array();_d=document;function addmenu(){menunum++;menus[menunum]=menu;}function dumpmenus(){mt="<script language=javascript>";for(a=1;a<menus.length;a++){mt+=" menu"+a+"=menus["+a+"];"}mt+="<\/script>";_d.write(mt)}
//Please leave the above line intact. The above also needs to be enabled if it not already enabled unless this file is part of a multi pack.

effect = "Fade(duration=0.2);Alpha(style=0,opacity=100);Shadow(color='#000000', Direction=155, Strength=0)"


timegap=500 // The time delay for menus to remain visible
followspeed=5 // Follow Scrolling speed
followrate=40 // Follow Scrolling Rate
suboffset_top=1; // Sub menu offset Top position
suboffset_left=1; // Sub menu offset Left position

style1=[ // style1 is an array of properties. You can have as many property arrays as you need. This means that menus can have their own style.
"009933", // Mouse Off Font Color
"ffffff", // Mouse Off Background Color
"ffffff", // Mouse On Font Color
"009933", // Mouse On Background Color
"009933", // Menu Border Color
10, // Font Size in pixels
"normal", // Font Style (italic or normal)
"bold", // Font Weight (bold or normal)
"Verdana, Arial", // Font Name
1, // Menu Item Padding
"/images/right.gif", // Sub Menu Image (Leave this blank if not needed)
, // 3D Border & Separator bar
"333300", // 3D High Color
"000099", // 3D Low Color
"", // Current Page Item Font Color (leave this blank to disable)
"", // Current Page Item Background Color (leave this blank to disable)
"", // Top Bar image (Leave this blank to disable)
"", // Menu Header Font Color (Leave blank if headers are not needed)
"", // Menu Header Background Color (Leave blank if headers are not needed)
"009933", // Menu Item Separator Color
]


addmenu(menu=[ // This is the array that contains your menu properties and details
"mainmenu", // Menu Name - This is needed in order for the menu to be called
150, // Menu Top - The Top position of the menu in pixels
333, // Menu Left - The Left position of the menu in pixels
110, // Menu Width - Menus width in pixels
0, // Menu Border Width
"absolute", // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
style1, // Properties Array - this is set higher up, as above
1, // Always Visible - allows the menu item to be visible at all time (1=on/0=off)
"center", // Alignment - sets the menu elements text alignment, values valid here are: left, right or center
, // Filter - Text variable for setting transitional effects on menu activation - see above for more info
, // Follow Scrolling - Tells the menu item to follow the user down the screen (visible at all times) (1=on/0=off)
1, // Horizontal Menu - Tells the menu to become horizontal instead of top to bottom style (1=on/0=off)
, // Keep Alive - Keeps the menu visible until the user moves over another menu or clicks elsewhere on the page (1=on/0=off)
, // Position of TOP sub image left:center:right
, // Set the Overall Width of Horizontal Menu to 100% and height to the specified amount (Leave blank to disable)
, // Right To Left - Used in Hebrew for example. (1=on/0=off)
, // Open the Menus OnClick - leave blank for OnMouseover (1=on/0=off)
, // ID of the div you want to hide on MouseOver (useful for hiding form elements)
, // Background image for menu when BGColor set to transparent.
, // Scrollable Menu
, // Reserved for future use
,"UCC Home","show-menu=design","/webdesign/","web design",1
,"Course Directory","show-menu=edatabases","/edatabases/","E-databases",1
,"19th Hole","show-menu=hosting","/hosting/","Web Hosting",1
,"Site Features","show-menu=domains","/domains/","Domain Registration",1
,"UCC Clubhouse","show-menu=emarketing","/emarketing/","E-Marketing",1
])


/*addmenu(menu=["edatabases",,,152,1,,style1,0,"left",effect,0,,,,,,,,,,,
,":: Canadian Courses","/edatabases/",,"What are e-databases",1
,":: U.S. Courses","/edatabases/databasedev.html",,"Database Development",1
])
*/
addmenu(menu=["edatabases",,,152,1,,style1,0,"left",effect,0,,,,,,,,,,,
,":: Canadian Courses","show-menu=cancourses"," ,":: U.S. Courses","show-menu=uscourses"," ])

addmenu(menu=["design",,,128,1,,style1,0,"left",effect,0,,,,,,,,,,,
,":: sitemap","/webdesign/",,"Professional Design",1
,":: guestbook","/webdesign/designrates.html",,"Design Rates",1
,":: contact us","/webdesign/ecommerce.html",,"E-Commerce",1
])

addmenu(menu=["domains",,,128,1,,style1,0,"left",effect,0,,,,,,,,,,,
,":: About Us","/domains/",,"Virtual Domains",1
,":: Link To Us","/domains/virtual.html",,"Virtual Domains",1
,":: Advertising","/domains/available.html",,"Available Domains",1
,":: UCC News","/domains/transfer.html",,"Transfer Your Domains",1
])
addmenu(menu=["hosting",,,128,1,,style1,0,"left",effect,0,,,,,,,,,,,
,":: E-Golf Feature","/hosting/",,"DANIMA Web Hosting",1
,":: Golf Links","/hosting/rates.html",,"DANIMA Hosting Rates",1
,":: Friends of UCC"," Payment",1
])



//here's one with a sub2 menu

addmenu(menu=["cancourses",,,128,1,,style1,0,"left",effect,0,,,,,,,,,,,
,"Alberta"," ,"British Columbia"," ,"Manitoba"," ,"New Brunswick"," ,"Newfoundland"," ,"Northwest Territories"," ,"Nova Scotia"," ,"Ontario"," ,"Prince Edward Island"," ,"Quebec"," ,"Saskatchewan"," ,"Yukon"," ])
addmenu(menu=["uscourses",,,145,1,,style1,0,"left",effect,0,,,,,,,,,,,
,"Northwestern States","show-menu=nwstates",,,1
,"South Western States","show-menu=swstates",,,1
,"Mid-Western States","show-menu=midweststates",,,1
,"Northeastern States","show-menu=northeaststates",,,1
,"Southeastern States","show-menu=southeaststates",,,1
,"Mid-Eastern States","show-menu=mideaststates",,,1
])

addmenu(menu=["nwstates",,,145,1,,style1,0,"left",effect,0,,,,,,,,,,,
,"Washington"," ,"Oregon","/ ,"Idaho"," ,"Montana"," ,"Wyoming"," ,"Minnesota"," ,"North Dakota"," ,"South Dakota"," ])

addmenu(menu=["swstates",,,145,1,,style1,0,"left",effect,0,,,,,,,,,,,
,"California"," ,"Nevada"," ,"Utah"," ,"Arizona"," ,"New Mexico"," ,"Texas"," ,"Louisiana"," ])

addmenu(menu=["midweststates",,,145,1,,style1,0,"left",effect,0,,,,,,,,,,,
,"Colorado"," ,"Nebraska"," ,"Kansas"," ,"Missouri"," ,"Oklahoma"," ,"Arkansas"," ,"Iowa"," ,"Indiana"," ,"Illinois"," ])

addmenu(menu=["northeaststates",,,145,1,,style1,0,"left",effect,0,,,,,,,,,,,
,"Michigan"," ,"Maine"," ,"New Hampshire"," ,"Vermont"," ,"Massachusettes"," ,"Rhode Island"," ,"New York"," ,"Pennsylvania"," ,"Connecticut"," ,"New Jersey"," ])

addmenu(menu=["southeaststates",,,145,1,,style1,0,"left",effect,0,,,,,,,,,,,
,"Tennessee"," ,"North Carolina"," ,"South Carolina"," ,"Mississippi"," ,"West Alabama"," ,"Georgia"," ,"Florida"," ])

addmenu(menu=["mideaststates",,,145,1,,style1,0,"left",effect,0,,,,,,,,,,,
,"Delaware"," ,"Maryland"," ,"District of Columbia"," ,"Kentucky"," ,"West Virginia"," ,"Viginia"," ,"Ohio"," ])
/* addmenu(menu=["freetrials",
,,120,1,"",style1,,"left",effect,,,,,,,,,,,,
,"Photo-Objects&#0153;","/downloads/freetrials.htm",,"Free trials",1
,"GraphicsDesk&#0153;"," Graphicsdesk",1
])


//// another one /////

addmenu(menu=["instinstr",
,,245,1,"",style1,,"left",effect,,,,,,,,,,,,
,"<B>Personal&nbsp;Series</B>","","","Installation instructions",0
,"The Big Box of Art&#0153; 215,000","/personal/tech_bboa215.htm#instinstr",,"Installation instructions",0
,"The Big Box of Art&#0153; 350,000","/personal/tech_bboa350.htm#instinstr",,"Installation instructions",0
,"The Big Box of Art&#0153; 615,000","/personal/tech_bboa615.htm#instinstr",,"Installation instructions",0
,"The Big Box of Art&#0153; Holidays &amp; Events","/personal/tech_bboa_he.htm#instinstr",,"Installation instructions",0
,"Photo Clip Art by Hemera&#153; (Windows&reg;)","/personal/tech_pca_win.htm#instinstr",,"Installation instructions",0
,"Photo Clip Art by Hemera&#153; (Macintosh&reg;)","/personal/tech_pca_mac.htm#instinstr",,"Installation instructions",0
,"<B>Business&nbsp;Series</B>","/business/index.htm","/index.htm","Installation instructions",0
,"GraphicsDesk&#0153;"," target=_blank",,"Installation instructions",0
,"Photo-Objects&#0153; 50,000 Vol I","/business/tech_pov1.htm#instinstr",,"Installation instructions",0
,"Photo-Objects&#0153; 50,000 Vol II","/business/tech_pov2.htm#instinstr",,"Installation instructions",0
])

*/


addmenu(menu=["emarketing",,,128,1,,style1,0,"left",effect,0,,,,,,,,,,,
,":: Event Calndar","/emarketing/article.html",,"About E-Marketing",1
,":: Sports Forum","/emarketing/searchengine.html",,"Search Engine Optimization",1
,":: Computer Mini-Putt","/emarketing/article.html",,"E-Marketing Article",1
])
addmenu(menu=["sites",
,,185,1,"",style1,,"left",effect,,,,,,,,,,,,
,":: www.ultimatecaddy.com"," target=_blank",,"Ultimate Caddy Golf Guide",0
,":: www.chooseniagara.com"," target=_blank",,"Choose Niagara: For Work and After Work",0
,":: www.ideasegroup.com"," target=_blank",,"Idease Group: Marketing & Promotions - Simplified",0
,":: www.easyfootballpool.com"," target=_blank",,"Easy Football Pool: Build Your Own Pool",0
,":: www.easywebpage.ca"," target=_blank",,"Easy Web Page",0
])

dumpmenus()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top