Re: Question on HTML "state" and ability to interact with server
| From: | David Otton | Date: | Wed, 30 Apr 2003 11:48:03 +0000 |
| Subject: | Re: Question on HTML "state" and ability to interact with server | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145763@lists.php.net to get a copy of this message | ||
On Wed, 30 Apr 2003 06:46:58 -0400, you wrote:
> I am assuming this is something only featured in Internet Explorer, but I
>was wondering if there were something I could look at to do something
>similar in PHP? The only things I could think of always led me to the same
>conclusion, the HTML page won't render until all of the code has been run,
>server side, and any updates of content would result in the entire page, and
>therefore its state, being re-rendered in the browser.
I'm fairly sure that what you're seeing is client-side behaviour.
ASP.NET divides the world into "uplevel" (IE 5.5 and above) and
"downlevel" (everything else) browsers. A component should spit out
fancy DHTML for an uplevel browser, and plain HTML for a downleve
browser.
Try looking at your page with Netscape or Opera (returning the correct
user-agent strings), and see if you see the same behaviour. Compare the
uplevel- and downlevel-generated scripts, and you'll probably see some
extra Javascript?
> Can someone tell me of some good resources discussing this behavior, and
>whether it is or might one day be supported by PHP? Back in my HTML-only,
>pre-PHP days, I made non-Explorer browsers load content dynamically using
>DHTML by sending the contents of a URL to a layer after I entered text and
>clicked a button, so hypothetically PHP might fit in that scheme. If anyone
>can point me in the right direction, I would be greatly appreciative....
I doubt PHP will ever "support" this, because it's basically Javascript,
therefore client-side. You could cut the code out of the
ASP.NET-generated page and into a PHP script, and it would work.
ASP.NET works at a different level of abstraction (simulating an
event-driven/OO model over HTTP), so you can consider ASP.NET components
as single entities, even though they are composed of HTML, Javascript,
servser-side code, etc. PHP or ASP, which work at a lower level of
abstraction, see client-side and server-side code as very seperate
things.