NOOB: Two onloads?

Discussion in 'HTML and CSS' started by Ricster, Sep 1, 2010.

  1. Ricster

    Ricster

    Joined:
    Sep 1, 2010
    Messages:
    1
    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);">
    Ricster, Sep 1, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. GenxLogic
    Replies:
    3
    Views:
    1,242
    andrewmcdonagh
    Dec 6, 2006
  2. johnmcmadeup@gmail.com
    Replies:
    3
    Views:
    278
    Jim Langston
    Apr 6, 2008
  3. Smeagol
    Replies:
    1
    Views:
    279
    Jonathan Gardner
    Aug 19, 2009
  4. Isidore

    Two onloads in one body

    Isidore, Oct 23, 2003, in forum: Javascript
    Replies:
    1
    Views:
    69
    Jerry Park
    Oct 24, 2003
  5. vbhoj74@gmail.com
    Replies:
    2
    Views:
    129
    Vineet Bhojnagarwala
    Jan 2, 2013
Loading...

Share This Page