Link to home
Start Free TrialLog in
Avatar of forums_mp
forums_mp

asked on

HTML page - Continuous GET request

This is my first time dabbling in HTML, AJax, JQuery etc....  That said, I have a server app which I'm able to test by simply launching a browser and typing:   http://localhost:15084/testService.

The browser in turn initiates a GET request and the services responds with XML which is displayed in the browser.   Next step is to send continuous GET requests (i.e. a continuous loop or loop N times).   The question:  Can I create an HTML page which I'll load within the browser to achieve my objective?  If yes, what does that HTML page look like?  Mockup would be greatly appreciated.   Ultimately, I'll end up using django but for now I'm hopeful I could bypass django
Avatar of mankowitz
mankowitz
Flag of United States of America image

If you're using jquery, the following will issue 10 nearly simultaneous requests for data.

<script>
 for (var i; i<10; i++)
    $.get( "http://www.stuff.com/xml", function( data ) {
          // do something with data
    });
</script>
Avatar of forums_mp
forums_mp

ASKER

Hate to pile on to this question ( I increased the points ), that said, the server app responds with either an image (image/jpeg) or XML (application/xml) for each GET request.   The question:   How can I check the content type and display the XML  and imagery.   Ajax and a mock up HTML page would suffice.... The XML




    "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
      "<st:testMedia>"
      "      <st:Info source=\"1\" sid=\"0939dde0-9460-4e72-b44a-a76a4395c99\">"
      "            <st:destURI>udp://225.10.10.1:15084</st:destURI>"
      "            <st:sourceStatus>Active</st:sourceStatus>"
      "      </st:Info>"
      "</st:testMedia>" ;
ASKER CERTIFIED SOLUTION
Avatar of mankowitz
mankowitz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial