window.onload

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dotnutshell
    New Member
    • Sep 2008
    • 3

    window.onload

    I have a website which defines the followign handler in its body

    [CODE=javascript]window.onload = function(){
    try{
    var id = document.getEle mentById("resul t");
    id.innerHTML = 'Loaded';
    }cach(e){
    alrt(e.descript ion);
    }
    MLS.GotRFID = function(res){
    alert(res);
    }

    }
    [/CODE]

    When this code runs, sometimes it works perfectly fine, but other times, the page throws an error saying the page is invalid. I am alittle confused what the error messahe means and googling the term oesnt bring anything fruitful back.
    Any help would be appreciated:


    [edit - removed useless links]
    Last edited by gits; Sep 18 '08, 01:55 PM. Reason: added code tags
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    please post the exact error-message ... is any other script code running besides this onload-handler?

    Comment

    Working...