|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
need script to delay to execution of a page include until page fully loaded
I have a PHP included page that takes quite a time to load. I would like to have the entire main page loaded and displayed and then the final include page executed.
Is this possible? Thanks for your help - appreciate it. |
|
#2
|
||||
|
||||
|
Are you sure you are talking about javascript? Javascript is client side, and there for has no way of knowing when a server-side script has finished executing.
You MAY be referring to the JS "onLoad" event handler, which fires once a page has finished rendering in the browser. |
|
#3
|
|||
|
|||
|
Yes - an onload script is exactly what I could use. As long as it happens after everything else has loaded.
How could I write an onload script to call an included page? Thanks! |
|
#4
|
||||
|
||||
|
What do you mean by "included page"?
|
|
#5
|
|||
|
|||
|
Thanks for your quick response. I actually would like to call an included PHP page. It pulls some content from another site to display on the page. It is a bit slow to process so I want the delay to happen after the rest of the site is loaded.
PHP Code:
|
|
#6
|
||||
|
||||
|
I have a feeling you are getting confused between client-side and server-side.
Javascript is client side. Include files can only be used in SERVER-side language like PHP, ASP. You can call pages from Javascript (document.location.href='page.htm'), but I seriously doubt that this is what you are trying to achieve. I think you need to look at your PHP code and maybe re-order the calls to your functions etc. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > need script to delay to execution of a page include until page fully loaded |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|