0

I'm running a webpage dashboard on a TV on the production floor of our factory so workers can see their live uptime, scrap etc.

I need the page to refresh when new data is available.

I want to load a page in a hidden iframe every x seconds, if the iframe is blank then do nothing but if there is a URL in the iframe then load that URL in the main page.

Example:
The Main page dashboard_Machine3.html calls a page in a hidden iframe newdata_Machine3.html every 10 seconds. If it sees that the newdata_Machine3.html page is blank, then nothing is done. If newdata_Machine3.html contains text eg "dashboard_Machine3.html" or "fire_alarm.html" then load that page in the main window.

This way I can jump to another screen if there is a critical problem somewhere or refresh that same page if there is new data to display.

-- Sorry if I wasn't clear, its a tricky one to explain :confused:

Is this possible?

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by muppet
0

hmm, no takers...

How about this then:

Page A is displayed on a TV showing some charts and info.
Page B is not displayed anywhere but contains the text "0"
As soon as page B contains the text "1", then refresh page A

Is there any way to so this?

By watching page B using a hidden iframe, then triggering a refresh event depending on its contents was my thought. But I'm no web developer.

Thanks anyway

0

iframe code for no problem

<html></html>

iframe code for problem condition

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><script type='text/javascript'>
<!-- 
top.location = 'location of selected problem page'
//--></script></head><body></bopdy></html>

Edited by almostbob: n/a

0

That works great! Now I can remote control my web browser without constant refreshes.

Thanks almostbob


Here is the code I used on the main page1. Main page2 looked the same but with different content.

<html> 
<head> 
<script type="text/javascript">
    function refreshiframe() 
    { 
        parent.frame1.location.href="/sub.html" 
        setTimeout("refreshiframe()",1000); 
    } 
</script>
</head>


<body bgcolor="#ffffff" onLoad='refreshiframe()'> 
Main Page1 content

<IFRAME id="frame1" src="/sub.html" style="width:0px; height:0px; border:0px">
</body> 
</html>

Edited by muppet: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.