Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Load Time - What's delaying this?

    http://everythingsyoga.netau.net/Ang...ite2/Eat.html#

    The second link to the right "Eat our Famous" is the link in question,
    you'll notice the div on the left has about a 3 second delay.

    Any thoughts? Thanks.

  • #2
    Senior Coder Logic Ali's Avatar
    Join Date
    Sep 2010
    Location
    London
    Posts
    1,028
    Thanks
    0
    Thanked 207 Times in 202 Posts
    It doesn't seem to work at all, which isn't surprising because you're passing an unquoted ID as a parameter:

    Code:
       <li onclick="toggleMain('divHome');"><a href="#">Indulge Deliciously</a></li>
          <br />
    
       <li onclick="toggleMain('divMenu');"><a href="#">Eat Our Famous:</a></li><br />

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,316
    Thanks
    203
    Thanked 2,566 Times in 2,544 Posts
    There are quite a few syntax errors of double quotes within double quotes, so the sub-menus do not work:-

    <div class="subMenu" onclick="toggleSubMenu("agcheese")">Adult Grilled Cheese</div>

    <script language="javascript"> is long deprecated and obsolete. Use <script type = "text/javascript"> instead.
    Last edited by Philip M; 08-24-2011 at 08:46 AM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • Users who have thanked Philip M for this post:

    rmfreyre (08-24-2011)

  • #4
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    i AM the author.. :)

    ..i'm tryin' to troubleshoot this. It seems to not work at all? or it doesn't work at all. I'm only on one computer so i don't get to check it too often, but i'm using "in-private browsing" to do my checks.

    at the end of the document you'll notice i declare the objects and send the objects to the JS functions. could that be why? sending an object instead of a string, because its larger it takes longer?

  • #5
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Philip M View Post
    There are quite a few syntax errors of double quotes within double quotes, so the sub-menus do not work:-

    <div class="subMenu" onclick="toggleSubMenu("agcheese")">Adult Grilled Cheese</div>

    <script language="javascript"> is long deprecated and obsolete. Use <script type = "text/javascript"> instead.
    i appreciate the input, though i'm not focusing on this part of the script.

    My question has to do with load time of the main pages. the subpages will probably be removed.

  • #6
    Senior Coder Logic Ali's Avatar
    Join Date
    Sep 2010
    Location
    London
    Posts
    1,028
    Thanks
    0
    Thanked 207 Times in 202 Posts
    Quote Originally Posted by rmfreyre View Post
    i appreciate the input, though i'm not focusing on this part of the script.

    My question has to do with load time of the main pages. the subpages will probably be removed.
    Once the site has loaded fully, I don't notice any appreciable delay in displaying the part you mentioned originally.
    There are errors being generated, caused by the statrements below trying to address unrendered elements.
    Code:
    document.getElementById('homePage').style.display = "block";
    document.getElementById('menuPage').style.display = "block";
    document.getElementById('contactPage').style.display = "block";
    document.getElementById('joinPage').style.display = "block";
    document.getElementById('menuFood').style.display = "block";


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •