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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A little XML help

Status
Not open for further replies.

Gxp

Technical User
Nov 24, 2004
6
CA
Hi,

I have this simple scripts here that i'm trying to incorporate into XML and I need a little help.

My xml pages:

new.jpg


My javascript file. What this javascript does is reset the page back to a homepage if idle on the set amount of time.

javascript.jpg



I know to call the javascript file from XML by the syntax above kiosk-reset.js, but what I'm lost is where should I put the onload, onmousemove, etc.. functions inside the xml page? so that the script will work with the XML just like it work with html?. If anyone can pointer a few advices, I would really appreciate it.
 
Can anyone help?

Here's the scripts in text form.

<script type="text/javascript">
<!--
var start = 30;
var timer = start;
function countdown(){
if(timer > 0){
document.test.x.value = timer;
timer -= 1;
setTimeout("countdown()",1000);
}
else{
location.href="}
}
//-->
</script>

<BODY onload="countdown();" onmousemove="timer=start" onclick="timer=start" onkeyup="timer=start">


My xml:

<?xml version="1.0"?>

<!DOCTYPE window [
<!ENTITY % kioskDTD SYSTEM "chrome://kiosk/locale/kiosk.dtd">
%kioskDTD;
<!ENTITY % bindingsDTD SYSTEM "chrome://kiosk/locale/bindings.dtd">
%bindingsDTD;
]>


<overlay id="reset-kioskOverlay"

xmlns:html="xmlns="
<window id="main-window">
<script type="text/javascript" src="./kiosk-reset.js"/>

<stringbundleset id="jsconstants">
<stringbundle id="kioskDefaults" src="chrome://kiosk/locale/kioskDefault.properties"/>
</stringbundleset>

</window>
</overlay>


Any help is appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top