Re: Access $_POST variables from Javascript?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Access $_POST variables from Javascript?

From: Lachlan Hunt <spam.my.gspot@gmail.com>
Date: Sun Aug 21 2005 - 10:43:41 CEST

Robert Oschler wrote:
> I know there isn't any $_POST array in Javascript, it exists on the server
> side accessible from PHP and other server side scripting languages. But I
> knew it would let you know specifically what data I'm after.
>
> Is there any way to get the data that is POSTED to a web page from
> client-side Javascript?

No, the data isn't posted to the web page, it's posted to the server,
which typically returns a web page (or other resource) in response.

> Or does only the server get access to it?

That's correct.

> I can get access to the URL/href data from the "search" property, but that's
> because it's part of the URL. What about POST'ed data?

No, unless that data is output by the server somewhere into the
document, in which case you could access it through the DOM.

-- 
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/     Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Received on Tue Oct 18 03:11:14 2005