Javascript to PHP script -- NEED HELP!

Discussion in 'Programming' started by MCJim, Sep 4, 2008.

  1. #1
    Hi I have a script that something like this:

    <script language="javascript" src="script.php">
    var x=5;
    </script>
    Code (markup):
    Is it possible to send the variable 'x' to script.php for manipulation?
     
    MCJim, Sep 4, 2008 IP
  2. Tarkan

    Tarkan Peon

    Messages:
    491
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yes it's called AJAX, you need a lot of functions to get JavaScript using XmlHttpRequest() in Firefox/Opera to communicate to PHP, and an ActiveXObject method for IE.
     
    Tarkan, Sep 4, 2008 IP
  3. MCJim

    MCJim Peon

    Messages:
    163
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    edit: never mind
     
    MCJim, Sep 4, 2008 IP