Website crashes on iPad

Discussion in 'JavaScript' started by G. Gnome, Nov 17, 2012.

  1. #1
    There are two things I've noticed, can someone give me a clue as to the cause?

    http://risingmusic.com

    1) When you scroll down, it forces some parts of the page to reload.

    2) On my ipad, scrolling down crashes the browser.
     
    G. Gnome, Nov 17, 2012 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    You could try setting the callback before sending (and matching your braces). I don't do iStuff, so I can't check it.
    
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState==4 && xmlhttp.status==200) {
            if (lastdata < 10)       { document.getElementById("txtnext").innerHTML += xmlhttp.responseText; }
            else if (lastdata == 10) { document.getElementById("txtnext").innerHTML += ""; }
        }
        [COLOR=#ff0000]} delete this[/COLOR]
        lastdata += 1;
    }
    xmlhttp.send(); 
    
    Code (markup):
     
    Rukbat, Nov 22, 2012 IP