View Full Version : Is sending header data with Javascript possible?

08-02-2006, 02:01 PM
Hey, just wondering whether it's possible for Javascript to send and receive header data, e.g. like PHP with fsockopen(), fputs() and fgets().

Just a yes or no is ok, though if you know a link to a HowTO that'd be cool too ;)

Philip M
08-02-2006, 02:24 PM
No, JavaScript has no means of accessing the server.

08-02-2006, 02:33 PM
Crap. OK, thanks anyway.

Btw, I did not mean sending header data for the same file, but to another file, because then I would be able to send POST data.

08-02-2006, 02:39 PM
You can send headers via XMLHttpRequest (setRequestHeader).

08-02-2006, 04:33 PM
I know this is answered but I need to correct you

Javascript CAN run at the server on ASP

<script type="text/javascript" language="javascript" runat="server">