Call javascript after page load with all elements available

3 posts, 1 answers
  1. Marcel
    Marcel avatar
    13 posts
    Member since:
    Mar 2012

    Posted 24 May 2012 Link to this post

    Hi everyone,
    I'd like to run a JS-function wich does several stuff to the available controls, right after the loading of the site.
    Now, I tried to us window.onload but the problem is if i use there the $.find method, the page is not yet loaded completely and the return of the $find-call is empty.
    Are there other ways to solve this, like other events, which are only called when the page was toatally loaded?
    How to use this other possibilities?

    Greetings,
    Marcel
  2. Answer
    Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 24 May 2012 Link to this post

    Hello Marcel

    Why don't you try pageLoad? Find more inforation in the belo articles:
    http://blogs.telerik.com/blogs/posts/08-12-13/don-t-use-body-onload-in-asp-net-ajax-websites.aspx
    http://www.asp.net/ajax/documentation/live/overview/AJAXClientEvents.aspx

    All the best,
    Iana Tsolova
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Marcel
    Marcel avatar
    13 posts
    Member since:
    Mar 2012

    Posted 25 May 2012 Link to this post

    That's what I was looking for.
    It works perfeclty, Thank you.

    Greetings,
    Marcel
Back to Top