Sending HTTP Request

Discussion in 'HTML & Website Design' started by Kuriyaki, Jul 13, 2009.

  1. #1
    I can place the following request in the address bar

    http://<server-name>/ptz.cgi?rpan=50

    hit enter, and it will work.

    I haven't found a way to create a button/link/etc that will allow me to send the request without having to load another page. I want to have the ability to press the button multiple times to send that request.

    What is the easiest way?
     
    Kuriyaki, Jul 13, 2009 IP
  2. Unni krishnan

    Unni krishnan Peon

    Messages:
    237
    Likes Received:
    9
    Best Answers:
    2
    Trophy Points:
    0
    #2
    Hi kuriyaki,

    Hope this solves your problem.

    <html>
    <title>Sending HTTP Request</title>
    <head></head>
    <body>
    
    <b><a href="http://<your-server-name>/ptz.cgi?rpan=50" target="Frame1">Send HTTP Request</a></b>
    
    <br><br>
    
    <iframe name="Frame1" src="" ></iframe>
    
    </body>
    </html>
    Code (markup):
    If you dont want the iframe to appear on page, make its size smaller, and hide it using javascript/css.
     
    Unni krishnan, Jul 14, 2009 IP
    Kuriyaki likes this.
  3. GoldenGrahams

    GoldenGrahams Active Member

    Messages:
    137
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #3
    To advance on the person above me:

    
    <html>
    <head>
    <title>Sending HTTP Request</title>
    <meta http-equiv="refresh" content="2">
    </head>
    <body>
    
    <iframe name="Frame1" src="http://<your-server-name>/ptz.cgi?rpan=50"></iframe>
    
    </body>
    </html>
    
    Code (markup):
    That would make it so you wouldnt even need to do a button, you just leave the page open and it would send a request every 2 seconds, you can change the content="2" if you wish for it to do it quicker or longer.
     
    GoldenGrahams, Jul 14, 2009 IP
    Kuriyaki likes this.
  4. Kuriyaki

    Kuriyaki Peon

    Messages:
    257
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Awesome thanks to both of you.

    I tried first using Ajax by loading the "page" into a div but it would freeze the video feed I was working with.

    Thanks for the solution @Golden & @Unni.
     
    Kuriyaki, Jul 14, 2009 IP