Jed Verity wrote:
>same page (i.e. not through the POST information of a submitted form). Is
>this because it's not possible?
Basically, this is not possible.
A common area of confusion to those new to Web programming is the
distinction between client-side and server-side code. PHP is an example
PHP, anything that is not PHP is simply output. It doesn't matter if the
When a user requests a PHP script, the PHP part of the script is
executed prior to the output being sent to the client. Remember, the
whatever else is appropriate. So, to get back to your question, you are
wanting to know how to have the browser (which is executing the
thousands of miles away on whatever Web server the page was obtained
from) "on the same page," which means you want to be able to do this
without communicating back to the Web server.
So, your question can be summarized into:
"How can my browser send data back to the Web server without any further
communication with the Web server?"
Hopefully that explains how it is impossible.
The terms server-side and client-side are ignored by most people,
understandably, because this industry is littered with useless terms
that do little to describe what is really happening (in the case of "Web
services," the term is actually misleading in my opinion). However,
these terms are very descriptive, and once you can begin to understand
which code is executed on the server-side (by the Web server prior to
sending the response to the Web client) and which code is executed on
the client-side (by the Web client after receiving the response from the
Web server), all of these types of questions will make more sense to you.
Hope that gives a good description of the difference and can help you
solve whatever problem you're currently working on.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php