Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Combining JavaScript and PHP, will a "document.load" event be triggered
when a .inc file is called in by a PHP 'include' statement?

Re: "Document.Load"

Quoted text here. Click to load it

PHP runs on the server and Javascript runs on the client (browser).
So the short answer is no.

Re: "Document.Load"

ZeldorBlat wrote:
Quoted text here. Click to load it

But when I asked my original question ("How do I get the first 'Input'
field on a Form, loaded by PHP commands, to take focus") you replied
that it could be done by JavaScript. How does that work if PHP and
JavaScript don't interact?

Re: "Document.Load"

On Tue, 19 Feb 2008 05:06:50 +0000, in comp.lang.php Alan M Dunsmuir

Quoted text here. Click to load it

You need to understand what is happening with your pages. A simplified
overview is:
The server loads the requested page
It sees the php extension and hands the file to php
Php then scans the file for php tags
the Interpreter processes these instructions generating the html code
where necessary.
The interpreter then hands this modified file back to the server
The server sends the file to the user.
The browser receives the file loading references files (CSS and js)
The browser then builds the DOM structure
Once all this is done the the onload event is fired. This is where you
are hooking into with the window.onload function.
The browser renders the page.
The browser then loads the images.
-- -------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au  : Remove your pants to reply
-- -------------------------------------------------------------

Site Timeline