HTTP Request (How?)

Discussion in 'JavaScript' started by kaisellgren, Apr 7, 2007.

  1. #1
    Hi,

    I need JS to make HTTP request (GET).

    I need JS to execute .php file with ?a=0&b=1&... GET parameters.

    httprequest = new Image(0,0);
    httprequest.src = 'a/a.php?test=1'; 
    Code (markup):
    Does not activate a.php file :(

    Any ideas?
     
    kaisellgren, Apr 7, 2007 IP
  2. giraph

    giraph Guest

    Messages:
    484
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You'll want to look into AJAX for that.
     
    giraph, Apr 8, 2007 IP
  3. Estevan

    Estevan Peon

    Messages:
    120
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    0
    #3
    hello

    
    function rg(r,i)  {
        i = new Image();
        i.src= 'a/a.php?test=1&mr=r&mi=i';
    }
    
    Code (markup):
    this send values from your script !
     
    Estevan, Apr 8, 2007 IP
  4. kaisellgren

    kaisellgren Well-Known Member

    Messages:
    472
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    110
    #4
    Hi,

    Thanks for help. I already got it resolved.

    document.write('<img src="a.php?values='window.location'" alt="" style="display: none;" />');

    ;)
     
    kaisellgren, Apr 8, 2007 IP