Get, show PDF, JPG, Video

November 5, 2009 at 02:12:30
Specs: Windows Vista
Hi Forum,

we want show some pages, documents on by on in fullscreen, without any user interaction.
This is a kind of digital signage application.

All of them are accesable via http:

1) http://.....any1.html
2) http://.....any2.pdf
3) http://.....any3.jpg
4) http://.... any4.mp4


We have no problems with 1). But what about the rest ?
How insert the contents to be able later rotat over them ?

Thanks in advance,

Michel


See More: Get, show PDF, JPG, Video

Report •


#1
November 10, 2009 at 04:06:39
None of the sites work.

Asus M4A78-EM
AMD Phenom II X2 550 @ 3.11
Patriot PC2-6400 4Gig
MSI R4830
Seagate 160Gig SATA
Seagate 320Gig SATA
External 1T


Report •

#2
November 10, 2009 at 08:18:57
no wonder, there are only examples. The question is, how to inject the documents into the DOM. It seems, that we need iframes (2,4)

Report •

#3
November 10, 2009 at 21:18:07
I'm not quite sure what you're asking, so this may be way off base. If you can use javascript, then maybe something like below can be used.

Substitude whatever code you'd use for each of the four options in the innerHTML property. Of course, the user would need to have js enabled.

<script type="text/javascript">

var cycle = 1;
var htm = "htm";
var pdf = "pdf";
var jpg = "jpg";
var mp4 = "mp4";

function rotate() {   

   createEl(cycle);

   if(cycle == 1) {
      cycle = 2;
   } else if(cycle == 2) {
      cycle = 3;
   } else if(cycle == 3) {
      cycle = 4;
   } else {
      cycle = 1;
   }
}

function createEl(mode) {   

   if(document.getElementById("dynEle") == null || 
      document.getElementById("dynEle") == undefined) {

      try {

         var d = document.createElement("div");

         d.id = "dynEle";
         d.style.position = "absolute"; // relative
         d.style.top    =  "10px"; // can be in switch
         d.style.left   =  "10px"; // can be in switch
         d.style.width  = "100px"; // can be in switch
         d.style.height = "100px"; // can be in switch             

         switch(mode) {

            case 1 : d.style.backgroundColor = "#ffff00";
                     d.innerHTML = htm; break;
            case 2 : d.style.backgroundColor = "#00ffff";
                     d.innerHTML = pdf; break;
            case 3 : d.style.backgroundColor = "#ff00ff";
                     d.innerHTML = jpg; break;
            case 4 : d.style.backgroundColor = "#9999ff";
                     d.innerHTML = mp4; break;
        }

        document.body.appendChild(d);
        delete(d);
      } catch(e) { alert('Error creating element' + '\n' + e.message); }

   } else {

      try {
         if(document.getElementById("dynEle") != null &&
            document.getElementById("dynEle") != undefined) {
            document.body.removeChild(document.getElementById("dynEle"));

         createEl(mode);
 
         }
      } catch(e) { alert('Error removing element' + '\n' + e.message); }
   }

   return;
} 

</script>

<body onload="setInterval('rotate()', 3000)">

HTH


Report •

Related Solutions

#4
November 11, 2009 at 00:01:02
Hi shutat,

that is more then I expected. I had diffculties with injection of pdf . I will try your cod.

Thanks for your effort.


Report •


Ask Question