Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Feb 2006
    Location
    The Netherlands
    Posts
    106
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Is sending header data with Javascript possible?

    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
    Yeah that.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,733
    Thanks
    202
    Thanked 2,508 Times in 2,486 Posts
    No, JavaScript has no means of accessing the server.

  • #3
    Regular Coder
    Join Date
    Feb 2006
    Location
    The Netherlands
    Posts
    106
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Yeah that.

  • #4
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    You can send headers via XMLHttpRequest (setRequestHeader).

  • #5
    Regular Coder DELOCH's Avatar
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    537
    Thanks
    4
    Thanked 2 Times in 2 Posts
    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">
    </script>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •