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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    page looks like it is still loading

    I have an entirely javascript page that once it is done it still looks like it is loading. This is more of an annoyance than anything harmful. The page can be viewed at http://mikedombrowski.com/mRNA.html
    Thank you for your help in advance.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,017
    Thanks
    203
    Thanked 2,538 Times in 2,516 Posts
    Sorry, I do not see the problem.

    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.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,550
    Thanks
    78
    Thanked 4,382 Times in 4,347 Posts
    Same for me.

    In what browser did you see this? No indication it is still loading in either Firefox or MSIE 7.

    Looks perfectly normal.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    New Coder
    Join Date
    Jul 2011
    Location
    Australia
    Posts
    47
    Thanks
    1
    Thanked 3 Times in 3 Posts
    When you are on the main page, it doesn't continue loading.
    However if you use the input field and hit 'Encode' or 'Decode' it then brings you to a page that continues loading until you hit stop.

    Although I don't have a solution, I believe that might clarify things for anybody who may have a solution for the thread creator.

  • #5
    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 Asher01 View Post
    When you are on the main page, it doesn't continue loading.
    However if you use the input field and hit 'Encode' or 'Decode' it then brings you to a page that continues loading until you hit stop.
    It's the usual problem of trying to use document.write in a closed document, which wipes-out all previous content including the script.

    The crudest fix for what you have in place, is to call document.open(); prior to the first call to document.write. Then after the last document.write, call document.close(); That will stop the loading symbol but it's still a poor show.

    It would be slightly better for the buttons to load separate pages that run the relevant function as they load.
    There are more sophisticated solutions beyond the scope of this response.


  •  

    Tags for this Thread

    Posting Permissions

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