Results 1 to 2 of 2

Thread: Using JavaScript to create a Kiosk

  1. #1
    Join Date
    Apr 2013

    Using JavaScript to create a Kiosk

    I am trying to use JavaScript to create a KIOSK. It will display a page for a number of seconds and than another, w/o user interaction. I have come to the conclusion that this is not possible because the language lacks threads.

    The following two Perl scripts crudely approximates the desired behavior. One stands up the page the other knocks it down. Can JavaScript do what I need or will I have to resort to using something like Java? Any guidance would be greatly appreciated.

    use strict;
    use warnings;
    while( 1 == 1){
    my $status = system('"C:\Program Files\Mozilla Firefox\firefox.exe" http://www.npr.org');
    system('"C:\Program Files\Mozilla Firefox\firefox.exe" http://www.pbs.org');

    use strict;
    use warnings;
    while( 1 == 1){
    my $status = system('taskkill /F /IM firefox.exe >nul 2>&1');

  2. #2
    Join Date
    Jul 2008
    urbana, il
    you can use a <meta refresh is you don't trust JS...

    in js, it's very simple to schedule a page load, no threads needed:

    }, 1000 * 15);
    you sould customize and drop-in the script for each page.
    of course, you can make it fancier and centralized using an iframe that is styled with CSS to take up the full screen.

     /*needs more styles, this is a start */
     html, body, iframe { margin:0; padding: 0; overflow: hidden; }
    <iframe width="100%" style=height:500px id=frame1></iframe>
    //the list of folder-relative pages to show:
    pages= ["page1.html", "page2.html", page3.html", "page4.html"];
    //this tracks the current page's numer in the array:
    function next(){ //the fn diplays the next page or first page if at the end:
       if(!pages[index]){ index=0; }
    setInterval( next, 1000 * 15 ); //advance every 15,000 mili-seconds
    Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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