This is a migrated thread and some comments may be shown as answers.

Call javascript after page load with all elements available

2 Answers 515 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Marcel
Top achievements
Rank 1
Marcel asked on 24 May 2012, 09:29 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Iana Tsolova
Telerik team
answered on 24 May 2012, 03:55 PM
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.
0
Marcel
Top achievements
Rank 1
answered on 25 May 2012, 10:48 AM
That's what I was looking for.
It works perfeclty, Thank you.

Greetings,
Marcel
Tags
General Discussions
Asked by
Marcel
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Marcel
Top achievements
Rank 1
Share this question
or