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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Need data from a "firmware" based server

    I am attempting to obtain and parse returned data using AJAX. PHP is not available for use.

    This is a bit unusual in that the values I need are obtained by querying a networked PTZ camera. A webpage/server exists within the camera as firmware with no way to add any file to the server. The data is obtained by querying the camera in this manner:

    [icode]http://example.com/test-cgi/com/need.cgi?query=position[icode]

    Typical results returned to the client are:

    camera=1 pan=-88 tilt=8 zoom=2266 focus=514 iris=2259

    There are actually three domains involved: One that holds the webpage (AJAX?) to be downloaded to the client. One in the camera firmware that holds the data. And the client.

    I need to display the returned values within the querying webpage. I cannot figure out how to access the camera domain from the webpage obtained from a second domain such that I would then be in a position to parse the returned data.

    The request needs to be "submitted" from within a function(), i.e. not from a user's press of a form button.

    Any help would be appreciated (!!)

    Thank you for your time,
    Frank

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,375
    Thanks
    11
    Thanked 592 Times in 572 Posts
    the problem is that there are two domains involved.
    you cannot use ajax to grab a page from any domain except the current one in the location bar.

    if you could get it to spit out JSON instead of just text, you could use the data from anywhere.
    but it sounds like you can't modify the camera's server at all.

    if that's the case, you will need some sort of server or .exe to move the data across domains, javascript won't let you do it.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.6, IE11:9.1, IE9:3.1, IE10:3.0, FF:17.2, CH:46, SF:11.4, NON-MOUSE:38%


  •  

    Posting Permissions

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