Hey, I have put together a script which does exactly what i want. The first function gets the value after # in a url, then the second changes the state of a div.
Both of the scripts function in Firefox. but I was hoping someone could help me make the two run together, So the value which the first function gets, is used for the second function
Thanks in advance.
Code:
<script language="javascript">
function gup(){
var regexS = "([\\#][^]*)";
var regex = new RegExp(regexS);
var results = regex.exec( window.location.href );
if(results == null) return "";
else return results[0].replace("#","");
}
function ShowHideLayer(divID) {
var box = document.getElementById(divID);
if(box.style.display == "none" || box.style.display=="") {
box.style.display = "block";
}
else {
box.style.display = "none";
}
}
</script>
Thanks in advance.