Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

5360 Screensaver On Touch Deactivate 1

Status
Not open for further replies.

MichaelCharlesShow

IS-IT--Management
Jan 10, 2013
1
US
I've replaced the default screensaver with a custom 5360 screensaver based on the samples in the html toolkit. It's barebones and just displays two images, one an animated gif. The screensaver works great, with the exception that touching it doesn't dismiss it anymore. The default one dismisses on touch, but not this one.

I'm guessing there is an on_touch event I need to write a handler for in the html? Anyone know what I need to do to respond to a touch event and dismiss the screensaver?

HTML:
<html>
	<head>
		<style type="text/css">
			.imageposition_spin	
			{
				position: absolute; 
				top: 50px;
				left:0px;	
			};
			.imageposition_base	
			{
				position: absolute; 
				top: 600px;
				left:0px;	
			};
		</style>
		<script>
			RequestFullScreenBrowser();
		</script>
	</head>
	<body>
		<div class="imageposition_spin">
			<img src="f_fwd_1.gif">
		</div>
		<div class="imageposition_base">
			<img src="rgb_480x800.gif">
		</div>
	</body>
</html>
 
The default one has this code
<!--===================================================================================================
// screensaver.html was designed by Mitel
// Version: 1.0.0.0
// Compatibility: Mitel 5360
// Licensing: Permission is granted to use as a basis for creating Screen Saver applications.
//===================================================================================================-->
<html>
<head>
<style type="text/css">
#TimeBox
{
position: absolute;
top: 40px;
text-align: center;
width: 480px;
height: 50px;
font-family: Mitel_53xx_Large_V2;
font-size: 14px;
text-decoration: none;
font-weight: bold;
z-index: 5;
color: #FFFFFF;

}

#backgroundImage
{
top: 0px;
left: 0px;
height: 800px;
width: 480px;
position: absolute;
}
</style>
<script type="text/javascript">
RequestFullScreenBrowser();

// List all the images to show in here
var images = [ "Mitel_Web_Brand.JPG", "Mitel_Web_Brand2.JPG", "Mitel_Web_Brand3.JPG" ];

// Choose an image at random to start
var currentImage = Math.floor(Math.random()*images.length);

var timeBoxElement;
var imageElement;

// Update the time, and switch to the next image
function UpdateDisplay()
{
timeBoxElement.innerHTML = TelML.LowLevel.GetTimeDate();
imageElement.src = images[currentImage];
if (++currentImage > images.length)
{
currentImage = 0;
}
}

// Once document loaded, populate the element references, and update the screen and schedule updates
window.onload = function()
{

timeBoxElement = document.getElementById("TimeBox");
imageElement = document.getElementById("backgroundImage");

UpdateDisplay();

setInterval("UpdateDisplay()", 60*1000);


// On any button or touch events, exit.
TelMLEvent.OnTouch = TelML.Browser.Close;
TelMLEvent.OnButtonPress = TelML.Browser.Close;
};

</script>
</head>
<body>
<div id="TimeBox"></div>
<img id="backgroundImage"></img>
</body>
</html>



I suspect you need to add this part
// On any button or touch events, exit.
TelMLEvent.OnTouch = TelML.Browser.Close;
TelMLEvent.OnButtonPress = TelML.Browser.Close;

If I never did anything I'd never done before , I'd never do anything.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top