Click to See Complete Forum and Search --> : Help with navigation menu


Ingutchini
06-21-2003, 01:55 AM
Hi everyone

I am just a beginner at Javascript and am struggling with a navigation menu I downloaded from JSource. Its the topbanner menu where there are 4 categories in text and as you mouseover each category it highlights the pages on the buttons underneath.

Well I have got everything done except to link the buttons to the pages - and I cannot work out how to do it! LOL

I believe its something to do with the following portion but I am unsure????? Please please help!!!!!!

//This sends
function go2url(hlink) {
// set temporary variable temp1 to the value of the dummy hidden field
var temp1 = document.menu.dummy.value;
// set the temporary variable temp2 to link array
var temp2 = (linx[temp1][hlink]);
// Construct the url for the link to point to
window.location = "http://www.yourdomain.com/"+temp2+".htm";
}

Am I right or is it another area of the script that provides the links?
Regards from a total novice :-)

Jona
06-21-2003, 06:12 PM
Can you please provide a link to the resource you have downloaded for this menu? The code you have provided does not completely define which "button" redirects to which page--the variables are what is needed to be changed.

Jona

Ingutchini
06-22-2003, 06:10 AM
Hello Jona

Thank you so much for taking the time to reply

The link you requested is:

http://javascript.internet.com/navigation/navigation-buttons.html

Basically I have the Page names on all the buttons when I mouse over the categories on the top - I just cannot find where to place the link for each button and how

Thank you again

From a hopeful Dee xxxx :D

Jona
06-22-2003, 02:21 PM
My mistake. The code you provided is the right part. Didn't see it. :p

All right, here is where you change the URL:


window.location = "http://www.yourdomain.com/"+temp2+".htm";


It explains all of this inside of the source code online. Should be easy enough to follow.

Jona