Click to See Complete Forum and Search --> : sliding_menu.js


hermitas
06-30-2003, 07:50 PM
I need help with resizing this sliding menu (sliding_menu.js).
I can widen the menu panel to 250 pixels but not the item_panel. Nothing wider than 150 pixels will work.
Many thanks.

<html>
<title>Sliding Menu</title>
<body text="#000000" leftmargin="25" topmargin="20">
<SCRIPT LANGUAGE="JavaScript">
function goToURL() { history.go(-1); }
</script>

<style>
.menu
{
position:relative;
background-color:#ffffcc;
border:1px solid darkblue;
width:250;
font-size:11px;
font-family:verdana;
font:bold;
position:absolute;
cursor:se-resize;
}
.item_panel
{
width:150;
border-left:1px solid darkblue;
border-right:1px solid darkblue;
clip:rect(0,150,0,0);
position:absolute;

}
.item_panel a
{
text-decoration:none;
color:black;
cursor:hand;
}
.item
{
background-color:lightyellow;
width:150;
font-size:10px;
font-family:verdana;

}
</style>

<script language="JavaScript" src="http://javascript.internet.com/navigation/sliding_menu.js"></script>
<center>
<table width=250><tr><td>
<script language="JavaScript">
//Link[nr] = "position [0 is menu/1 is item],Link name,url,target (blank|top|frame_name)"
var Link = new Array();
Link[0] = "0|Asset Class";
Link[1] = "1|Currencies FRX";
Link[2] = "1|Global Debt DBT";
Link[3] = "1|Global Markets GEM";
Link[4] = "1|Equities STK";
Link[5] = "1|Commodities CMD";
Link[6] = "1|Energy Markets ENR";
Link[7] = "0|General Debt Market";
Link[8] = "1|ABS ABS";
Link[9] = "1|Emerging Markets Debt GEMD";
Link[10] = "1|FRNs FRN";
Link[11] = "1|High Yield Bonds HYB";
Link[12] = "1|Inflation Indexed Notes IIN";
Link[13] = "1|Investment Grade Bonds IGB";
Link[14] = "1|Ratings AAA";
Link[15] = "1|Repos RPS";
Link[16] = "1|Strips STRIP";
Link[17] = "0|Energy";
Link[18] = "1|Oil OIL";
startup(4);
</script>
</body>
</html>

A1ien51
07-01-2003, 01:23 AM
I am guessing in the .js file there is a limit in that code for how far it slides out....Is that your problem. I really did no look at the code hard

hermitas
07-01-2003, 09:58 AM
I was guessing that was the case. That the width of the menu item was limited in the .js file (I don't know much about .js I just edit html). But it does not make sense to put a limit in the menu items and not the section menu bar.
I assume the .js cannot be changed except by the author, right?
Thank you much for your reply anyway.

chrismartz
07-03-2003, 02:08 PM
If you download this .js file and right click on it and choose edit, you will see that the set width is 152 pixels. You can change this to your desired size and save it to your own server. you can also change any other attribute such as the colors. Instead of:


<script language="JavaScript" src="http://javascript.internet.com/navigation/sliding_menu.js"></script>


Make it


<script language="JavaScript" src="sliding_menu.js"></script>

hermitas
07-03-2003, 02:30 PM
Angel!! It worked like a charm and I learned something so useful about editing Javascript. I appreciate your interest and help. I also thank the e-mail I received alerting me to this response. This site/bulletin works great!! :)