sneezy32 Posted June 7, 2007 Share Posted June 7, 2007 Hi there, built a sliding gallery with a tab control at the top. I have a script which appears to work in Firefox but not IE. THe issus is the tabs are sticking to the right divs when you leave the page and then come back to it. Any suggestions would be welcome <% 'Dim registerScript 'registerScript ="onload=""changeStyle(document.getElementById('styleSelected').value);""" %> <!--#include virtual="/includes/navigation-includes/top-template.asp" --> <!--#include file="page-name.asp" --><!-- to add a page name to all hub pages so that the page id in the side_nav_container.asp links to the page specified within the page-name.asp --> <script src="/includes/javascript-includes/prototype.js" type="text/javascript" charset="utf-8"></script> <script src="/includes/javascript-includes/effects.js" type="text/javascript" charset="utf-8"></script> <script src="/includes/javascript-includes/slider.js" type="text/javascript" charset="utf-8"></script> <div class="controls" id="gourmet"> <ul id="nav"> <li id="t-gourmet"><a href="#section1" onclick="changeStyle('gourmet');" id="gourmet-link">gourmet delight</a></li> <li id="t-pamper"><a href="#section2" onclick="changeStyle('pamper');" id="pamper-link">pamper yourself</a></li> <li id="t-modern"><a href="#section3" onclick="changeStyle('modern');" id="modern-link">modern chic</a></li> <li id="t-grand"><a href="#section4" onclick="changeStyle('grand');" id="grand-link">grand opulence</a></li> <li class="end" id="t-special"><a href="#section5" onclick="changeStyle('special');" id="special-link">special offers</a></li> </ul> <div class="scroller"> <div class="content"> <script type="text/javascript"> function changeStyle(obj) { //alert(obj); if(obj.length>0) { var links = document.getElementsByTagName("div") for(i=0;i<links.length;i++) { if (links.className=='controls') {links.id=(obj);} } document.getElementById("styleSelected").value = obj; //alert(document.getElementById("styleSelected").value); } } //end func </script> <input type="hidden" id="styleSelected" value=""></input> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.