Hi,
Sorry to ask this while others have too, but the answers for them didn't work for me and I really know nothing when it comes to JS.
I have a portfolio page that had an onload so that the first image of the thumbnails would automatically load with the page. Worked fine. I added some bells and whistles and now it doesn't work. The bells and whistles being a NiftyCorner JS and an expandable menu. The menu works, but the other two, both with the onload command won't work. I've tried a semicolon between them in all the possible configurations that I can think of and yet no luck. Here's the code...let me know if you need this to be live and I'll push it.
Thanks in advance!!!
<style type="text/css"></style>
<link rel="stylesheet" type="text/css" href="css/design.css" />
<script language="JavaScript" type="text/JavaScript"></script>
<script type="text/javascript" src="niftycube.js"></script>
<script type="text/javascript"> window.onload=function(){Nifty("div#p7TMM_1","big" );}</script>
<link href="p7tmm/p7TMM10.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="p7tmm/p7TMMscripts.js"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
//This is the script to take querystrings from the URL and convert them into
//a Javascript array. "?search=whatever" becomes querystring["search"]
//this loads the portion of the url containing the querystring, and also
//decodes any special character codes
var que = unescape(location.search);
//gets value of querystring
var que = que.substring(que.lastIndexOf("=") + 1);
var layer = 'Div' + que
//toggle between layers - on/off
function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
var obj = document.layers ? document.layers[szDivID] :
document.getElementById ? document.getElementById(szDivID).style :
document.all[szDivID].style;
obj.visibility = document.layers ? (iState ? "show" : "hide") :
(iState ? "visible" : "hidden");
}
//-->
</script>
</head>
<body onload="javascript: toggleBox(layer,1);">
Sorry to ask this while others have too, but the answers for them didn't work for me and I really know nothing when it comes to JS.
I have a portfolio page that had an onload so that the first image of the thumbnails would automatically load with the page. Worked fine. I added some bells and whistles and now it doesn't work. The bells and whistles being a NiftyCorner JS and an expandable menu. The menu works, but the other two, both with the onload command won't work. I've tried a semicolon between them in all the possible configurations that I can think of and yet no luck. Here's the code...let me know if you need this to be live and I'll push it.
Thanks in advance!!!
<style type="text/css"></style>
<link rel="stylesheet" type="text/css" href="css/design.css" />
<script language="JavaScript" type="text/JavaScript"></script>
<script type="text/javascript" src="niftycube.js"></script>
<script type="text/javascript"> window.onload=function(){Nifty("div#p7TMM_1","big" );}</script>
<link href="p7tmm/p7TMM10.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="p7tmm/p7TMMscripts.js"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
//This is the script to take querystrings from the URL and convert them into
//a Javascript array. "?search=whatever" becomes querystring["search"]
//this loads the portion of the url containing the querystring, and also
//decodes any special character codes
var que = unescape(location.search);
//gets value of querystring
var que = que.substring(que.lastIndexOf("=") + 1);
var layer = 'Div' + que
//toggle between layers - on/off
function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
var obj = document.layers ? document.layers[szDivID] :
document.getElementById ? document.getElementById(szDivID).style :
document.all[szDivID].style;
obj.visibility = document.layers ? (iState ? "show" : "hide") :
(iState ? "visible" : "hidden");
}
//-->
</script>
</head>
<body onload="javascript: toggleBox(layer,1);">