asp.net Window.OnLoad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mvmashraf
    New Member
    • Oct 2007
    • 36

    #1

    asp.net Window.OnLoad

    Hai
    -------------------
    In my asp.net page on the onload event i had write a java script function to record the scroll value of browser.

    window.onload = sstchur_SmartSc roller_Scroll;

    defenition
    ----------
    function sstchur_SmartSc roller_Scroll()
    {
    var x = document.forms[formID].xCoordHolder.v alue;
    var y = document.formsf ormID].yCoordHolder.v alue;
    window.scrollTo (x, y);
    }

    But it shows error as 'document.getEl ementById(...). xCoordHolder.va lue' is null or not an objec"

    My form id="form1"

    What may be the reason..Any help would be much appreciatable..

    By Ashraf
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    javascript has access to the DOM properties for it, not specialized backend code properties.
    I suggest looking up how to handle scrolling with javascript in a search engine?

    Comment

    Working...