NOOB: Two onloads?

Joined
Sep 1, 2010
Messages
1
Reaction score
0
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);">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top