Post by Pritchard [Epic][Girly Boy] on Jan 2, 2008 10:18:32 GMT
Pretty much, I wrote this script, I'm not even sure it will work. Well, I am, but I'm not sure if I'm setting this up for other people to use. Any help is appreciated. Comment all you want.
A script for use on any website. This allows you to make a tabbed menu with on/off images. On/Off images will be refereed as "active" and "non active images" and should not be improperly placed when integrated with your website. That is, unless you like embarrassing comments about how big of a "noob" you are.
Your link for the active menu button should look like this.
Then all of you other links should look like this.
Where # will be replaced by the page name or number.
Be sure not to change the
menu_
area, but only the # after it.
This makes what image you are using the "on" image
Essentially, Var Menu_# (# is the page number accordingly) will be what ever page you are on. The true and false statements change any time you move it to a page. As the code is now, it is set at the first page tab being displayed as the active page.
So, I'm not really sure where to go with it from here...
Help?
-Pritchard
A script for use on any website. This allows you to make a tabbed menu with on/off images. On/Off images will be refereed as "active" and "non active images" and should not be improperly placed when integrated with your website. That is, unless you like embarrassing comments about how big of a "noob" you are.
<!--place this script where ever you want the images to switch-->
<!--be sure to change the true/false statements accordingly-->
<script type='text/javascript'>
var menu_1 active = false;
var menu_2 active = true;
var menu_3 active = true;
var menu_4 active = true;
var menu_5 active = true;
var depressed_reset = new Image();
depressed_reset.src = 'active image url here'
function do_depressed_reset() {
var localelement = document.getElementById('menu-active');
if(localelement) localelement.src = depressed_reset.src;
}
</script>
Your link for the active menu button should look like this.
<a href='page url'><img src='image url' id='menu-active'/></a>
Then all of you other links should look like this.
<a href='page url'><img src='image url' id='menu_#'/></a>
Where # will be replaced by the page name or number.
Be sure not to change the
menu_
area, but only the # after it.
This makes what image you are using the "on" image
Essentially, Var Menu_# (# is the page number accordingly) will be what ever page you are on. The true and false statements change any time you move it to a page. As the code is now, it is set at the first page tab being displayed as the active page.
So, I'm not really sure where to go with it from here...
Help?
-Pritchard