Announcement

Collapse
No announcement yet.

Trying to install a webcam.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Trying to install a webcam.

    Can sombody please tell me why this javascript doesn't function under the homeseer server.
    The log tells me: Web Server Error 404, cannot serve file: D:\HomeSeer\html/Robocam/robocam.jpg?1151660197062

    The script works fine if i click on it directly in explorer.

    script:

    function reloadImage(){
    if (document.images) {
    document.images.CamPic.src = 'Robocam\robocam.jpg?' + (new Date()).getTime();
    }
    setTimeout('reloadImage()',15000);
    }
    setTimeout('reloadImage()',15000);

    #2
    Originally posted by RonSmeets
    Can sombody please tell me why this javascript doesn't function under the homeseer server.
    The log tells me: Web Server Error 404, cannot serve file: D:\HomeSeer\html/Robocam/robocam.jpg?1151660197062

    The script works fine if i click on it directly in explorer.

    script:

    function reloadImage(){
    if (document.images) {
    document.images.CamPic.src = 'Robocam\robocam.jpg?' + (new Date()).getTime();
    }
    setTimeout('reloadImage()',15000);
    }
    setTimeout('reloadImage()',15000);
    Are you images named robocam.jpg?1151660197062 ?

    The question mark is normally reserved for querystring in HTML URLs and this probably throwing the web server off.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      The image is just robocam.jpg
      The ?1151660197062 is added by the script to fool the browser to not use the cached version of the image and allways refresh it. This seemes to work with most servers, just not with the homeseer server.

      Comment


        #4
        Ron,
        Can you change the line to this and try it.

        document.images.CamPic.src = 'Robocam\robocam.jpg?imgID=' + (new Date()).getTime();
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #5
          Nice try, but no cigar.

          Log entry:
          1-7-2006 10:47:14 Error Web Server Error 404, cannot serve file: D:\HomeSeer\html/Robocam/robocam.jpg? imgID=1151743634578

          You may notice the space between ? and imgID, but without it the result was the same.

          I think the homeseer server just won't accept these kind of constructions.
          That is however not really a problem anymore since i found an even better way to implement my cam on a html page. I read the source of the page generated in the cam server and simply copied the bits i needed to my own page. Works like a charme.

          Rests me to thank you for trying to help me.

          Comment

          Working...
          X