LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-08-2003, 01:36 PM   #1
DaFrEQ
Member
 
Registered: Mar 2002
Location: Earth... for now
Distribution: SuSE9.2 AMD64; LFS; GentooAMD64; Ubuntu10.04; RHEL 5.5; Solaris10(SPARC)
Posts: 418

Rep: Reputation: 30
Javascript && Bookmark -- need help plz


Hey all.
I have a NAV bar (menu bar) that is .js. I've got all the working files and such. The nav bar works like a charm.

However, I was wondering if anyone knew of how to link items in a menu/nav bar to a Bookmark in a web page?

The script is in its little .js file so It's not actually in my web page. But I can actually edit the script easily. I tried using the #bookmark tradition, but that didn't work.

Any ideas?

Tnx.

L8rz
 
Old 10-08-2003, 01:47 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Can you post the script and an example page.

Did you get any error messages?
 
Old 10-08-2003, 02:47 PM   #3
DaFrEQ
Member
 
Registered: Mar 2002
Location: Earth... for now
Distribution: SuSE9.2 AMD64; LFS; GentooAMD64; Ubuntu10.04; RHEL 5.5; Solaris10(SPARC)
Posts: 418

Original Poster
Rep: Reputation: 30
Well... I can post the code itself. I dont have a place to park the page so you can actually see it.

But... at:
http://www.dynamicdrive.com/dynamici...men4/index.htm

is where I got the script.
So if that helps.

The config file im editing is: menu_aray.js
this is where the links are for the menus. Im wanting to put a bookmark link from this menu (.js file) to a web page

tnx
 
Old 10-08-2003, 02:59 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
It seems to work fine for me. Can you post your menu_aray.js file and the files you are linking from/to.
 
Old 10-08-2003, 03:13 PM   #5
DaFrEQ
Member
 
Registered: Mar 2002
Location: Earth... for now
Distribution: SuSE9.2 AMD64; LFS; GentooAMD64; Ubuntu10.04; RHEL 5.5; Solaris10(SPARC)
Posts: 418

Original Poster
Rep: Reputation: 30
here goes:
menu_array.js
*************************
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)}
if(navigator.appVersion.indexOf("MSIE 6.0")>0)
{
effect = "Fade(duration=0.2);Alpha(style=0,opacity=88);Shadow(color='#777777', Direction=135, Strength=5)"
}
else
{
effect = "Shadow(color='#777777', Direction=135, Strength=5)" // Stop IE5.5 bug when using more than one filter
}


timegap=500 // The time delay for menus to remain visible
followspeed=5 // Follow Scrolling speed
followrate=40 // Follow Scrolling Rate
suboffset_top=10; // Sub menu offset Top position
suboffset_left=10; // 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.
"white", // Mouse Off Font Color
"B56D26", // Mouse Off Background Color
"ffebdc", // Mouse On Font Color
"B56D28", // Mouse On Background Color
"000000", // Menu Border Color
12, // Font Size in pixels
"normal", // Font Style (italic or normal)
"bold", // Font Weight (bold or normal)
"Verdana, Arial", // Font Name
4, // Menu Item Padding
"arrow.gif", // Sub Menu Image (Leave this blank if not needed)
, // 3D Border & Separator bar
"66ffff", // 3D High Color
"000099", // 3D Low Color
"Purple", // Current Page Item Font Color (leave this blank to disable)
"pink", // Current Page Item Background Color (leave this blank to disable)
"arrowdn.gif", // Top Bar image (Leave this blank to disable)
"ffffff", // Menu Header Font Color (Leave blank if headers are not needed)
"000099", // Menu Header Background Color (Leave blank if headers are not needed)
]



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
20, // Menu Top - The Top position of the menu in pixels
200, // Menu Left - The Left position of the menu in pixels
, // Menu Width - Menus width in pixels
1, // Menu Border Width
"center", // 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)
"left", // Alignment - sets the menu elements text alignment, values valid here are: left, right or center
effect, // 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)
, // Reserved for future use
, // Reserved for future use
, // Reserved for future use
,"Home","nopage.htm",,"Back to Main Page",1 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
,"Logistics&nbsp;&nbsp;","show-menu=logistics",,"",1
,"Health/Safety&nbsp;&nbsp;","show-menu=healthSafety",,"",1
,"Accounting&nbsp;&nbsp;","show-menu=accounting",,"",1
,"Communications&nbsp;&nbsp;","show-menu=commo",,"",1
,"Other&nbsp;&nbsp;","show-menu=other",,"",1
])

addmenu(menu=["logistics",
,,180,1,,style1,0,"left","randomdissolve(duration=0.5);Shadow(color='#999999', Direction=135, Strength=5)",0,,,,,,,,,,,
,"<img src=newsimage.gif border=0>&nbsp;Shipping Agent","nopage.htm",,,1
,"<img src=newsimage.gif border=0>&nbsp;Travel Arrangements","show-menu=logisticsTravelArrangements",,,1
,"<img src=newsimage.gif border=0>&nbsp;Passports/Visas","show-menu=passportsVisas",,,1
,"<img src=newsimage.gif border=0>&nbsp;Company Lodging","show-menu=lodging",,,1
,"<img src=newsimage.gif border=0>&nbsp;Car Rental","show-menu=carRental",,,1
,"<img src=newsimage.gif border=0>&nbsp;MOB Sheet","nopage.htm",,,1
])

addmenu(menu=["logisticsTravelArrangements",
,,170,1,"",style1,,"left",effect,,,,,,,,,,,,
,"Introduction","nopage.htm",,,0
,"US Travel Agent","nopage.htm",,,0
,"UK Travel Agent","nopage.htm",,,0
,"Vacations & Business","nopage.htm",,,0
,"Frequent Flyers","nopage.htm",,,0
,"Personal Travel Profiles","nopage.htm",,,0
,"Logistic Coordinators","show-menu=logisticCoordinators",,,0
])

addmenu(menu=["logisticCoordinators",
,,120,1,"",style1,,"left",effect,,,,,,,,,,,,
,"Fugro-LCT Inc.","nopage.htm",,,
,"Fugro-LCT Ltd.","nopage.htm",,,
])

addmenu(menu=["passportsVisas",
,,170,1,"",style1,,"left",effect,,,,,,,,,,,,
,"Introduction","nopage.htm",,,0
,"Passports","nopage.htm",,,0
,"Visas","nopage.htm",,,0
,"Visa Photos","nopage.htm",,,0
])

addmenu(menu=["lodging",
,,170,1,"",style1,,"left",effect,,,,,,,,,,,,
,"Introduction","nopage.htm",,,0
,"US Lodging","nopage.htm",,,0
,"Reservations","nopage.htm",,,0
,"Cleaning Services","nopage.htm",,,0
,"Rules","nopage.htm",,,0
])

addmenu(menu=["carRental",
,,170,1,"",style1,,"left",effect,,,,,,,,,,,,
,"Introduction","nopage.htm",,,0
,"Fugro Corporate Account","nopage.htm",,,0
,"Budget Contract Rates","nopage.htm",,,0
,"Car Rental Insurance","nopage.htm",,,0
,"Non-Budget Rentals","nopage.htm",,,0
,"Personal Car Rentals","nopage.htm",,,0
,"UK Car Rental","nopage.htm",,,0
,"Accident Reporting","nopage.htm",,,0
])

addmenu(menu=["healthSafety",
,,255,1,,style1,0,"left","randomdissolve(duration=0.5);Shadow(color='#999999', Direction=135, Strength=5)",0,,,,,,,,,,,
,"<img src=newsimage.gif border=0>&nbsp;Fugro-LCT Safety Handbook","nopage.htm",,,1
,"<img src=newsimage.gif border=0>&nbsp;Fugro Inc. Safety/Policy Manual","nopage.htm",,,1
,"<img src=newsimage.gif border=0>&nbsp;IAGC Safety Manual","nopage.htm",,,1
,"<img src=newsimage.gif border=0>&nbsp;Back Pain","nopage.htm",,,1
,"<img src=newsimage.gif border=0>&nbsp;Load Handling","nopage.htm",,,1
])


addmenu(menu=["Accounting",
,,190,1,,style1,0,"left","randomdissolve(duration=0.5);Shadow(color='#999999', Direction=135, Strength=5)",0,,,,,,,,,,,
,"<img src=newsimage.gif border=0>&nbsp;UK Based Operators","nopage.htm",,,1
,"<img src=newsimage.gif border=0>&nbsp;US Based Operators","nopage.htm",,,1
])

addmenu(menu=["commo",
,,190,1,,style1,0,"left","randomdissolve(duration=0.5);Shadow(color='#999999', Direction=135, Strength=5)",0,,,,,,,,,,,
,"<img src=newsimage.gif border=0>&nbsp;UK Communications","show-menu=ukCommo",,,1
,"<img src=newsimage.gif border=0>&nbsp;US Communications","show-menu=usCommo",,,1
])

addmenu(menu=["ukCommo",
,,170,1,"",style1,,"left",effect,,,,,,,,,,,,
,"E-Mail Procedures","nopage.htm",,,0
,"Monday Requirements","nopage.htm",,,0
,"Contact List","nopage.htm",,,0
,"Agent List","nopage.htm",,,0
])

addmenu(menu=["uSCommo",
,,170,1,"",style1,,"left",effect,,,,,,,,,,,,
,"E-Mail Communications","nopage.htm",,,0
,"Monday Requirements","#MondayReqs",,,0
,"Contact List","nopage.htm",,,0
])


addmenu(menu=["Other",,,140,1,,style1,0,"left","randomdissolve(duration=0.5);Shadow(color='#999999', Direction=135, Strength=5)",0,,,,,,,,,,,
,"Menu Authors Site","http://www.milonic.co.uk/menu",,"Milonic DHTML Menu Site",1
])


dumpmenus()
*******************
the BOLD portion is where I put the bookmark ref. i need it to point to a section in an html doc in the same dir.

any of that make sense?
 
Old 10-09-2003, 12:07 PM   #6
DaFrEQ
Member
 
Registered: Mar 2002
Location: Earth... for now
Distribution: SuSE9.2 AMD64; LFS; GentooAMD64; Ubuntu10.04; RHEL 5.5; Solaris10(SPARC)
Posts: 418

Original Poster
Rep: Reputation: 30
I figured it out.

Tnx.

L8rz
 
Old 10-09-2003, 12:15 PM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Try it with the filename too:
,"Monday Requirements","http://www.myhost.com/path/to/myhtmlfile.html#MondayReqs",,,0

EDIT: That was some timing!

Last edited by david_ross; 10-09-2003 at 12:16 PM.
 
Old 10-09-2003, 01:13 PM   #8
DaFrEQ
Member
 
Registered: Mar 2002
Location: Earth... for now
Distribution: SuSE9.2 AMD64; LFS; GentooAMD64; Ubuntu10.04; RHEL 5.5; Solaris10(SPARC)
Posts: 418

Original Poster
Rep: Reputation: 30
Ya it was wasn't it...

Tnx for ur help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
zsnes && logitech dual action gamepad && dpad woes John5788 Linux - Games 5 10-29-2008 09:56 PM
(FreeBSD && Fedora Core 4 && Slackware 10.0) Filesystem Support taylor_venable *BSD 1 07-14-2005 02:24 PM
Japanese canna won't work : Warning: &#12363;&#12394;&#28450;&#23383;&#22793;&am OrganicOrange84 Debian 3 06-30-2005 02:28 PM
Ph&#7909;c h&#7891;i d&#7919; li&#7879;u b&#7883; m&#7845;t???, c&#7913; pollsite General 1 06-27-2005 12:39 PM
Pointers && Gade PLZ HELP OutToSea Programming 6 06-15-2003 08:27 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration