try:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<meta id="viewport" name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;"/>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<style type="text/css">
body {
-webkit-user-select: none; /* controls whether the user is allowed to select the text of the element. */
-webkit-text-size-adjust: none; /*size adjustment for displaying text content in Safari on iPhone. none=the text size is not adjusted */
background: #111111;
color:white;
}
body > * {
display: none;
position: absolute;
margin: 0;
padding: 0;
left: 0;
top: 0px;
width: 100%;
min-height: 480px;
}
body > *[selected="true"] {
display: block;
}
h2 {
text-align: center;
margin: 8px 0px 00px 0px;
}
table{
border-width: 0px;
border-spacing: 10px;
border-style: solid;
border-collapse: separate;
background-color: #000000;
text-align:center;
width: 100%;
text-decoration: none;
color: #ffffff;
font-size: 18px;
font-weight: bold;
table-layout: fixed
}
table td{
height: 50px;
border-width: 3px;
border-style: solid;
border-color: #888888;
background-color: #303030;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
}
table td.selected {
color: #bbccdd;
background-color: #000000;
border-color: #dddddd;
}
table img{
height:40px;
vertical-align: middle;
}
#Activities table{
height: 460px;
border-spacing: 30px;
}
#Activities td{
font-size: 24px;
}
</style>
<script type="text/javascript">
function triggerEventGhost(value) {
command('triggerEventGhost', value, '', false);
}
function command(action, value, subvalue, synchron) {
// sends a synchron/asynchron command to xpTunes server
//request
var url='';
value = encodeURIComponent(value);
/* prevent cache with new Date().valueOf() */
if( typeof(subvalue) !== null && typeof(subvalue) !=='undefined') {
url = 'control.cgi?command=' + action + '&value=' + value + '&subvalue=' + subvalue +'&preventCache=' + new Date().valueOf();
}else{
url = 'control.cgi?command=' + action + '&value=' + value + '&preventCache=' + new Date().valueOf();
}
if (window.XMLHttpRequest) { // Mozilla, Safari, IE7...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType('text/xml');
}
}else if (window.ActiveXObject) { // IE6
try {
http_request = new ActiveXObject('Msxml2.XMLHTTP');
}catch (e){
try {
http_request = new ActiveXObject('Microsoft.XMLHTTP');
} catch (c) {}
}
}
var ret;
if (http_request) {
http_request.onreadystatechange = function (){
if (http_request.readyState == 4) {
if (http_request.status == 200) {
var ret = commandCallback(http_request.responseText);
return ret;
}
}
};
http_request.open('GET', url, true);
}
http_request.send(null);
return ret;
}
function commandCallback(jsonArr) {
//callback from xpTunes Server
//response 2. step
if(jsonArr.length > 0){
try{
var jsonObjArr = eval('(' + jsonArr + ')');
}catch(zyy){
}
setTimeout(iui.updateMsgCommand, 400,'');
for (var b = 0; b < jsonObjArr.length; b+=1) {
started = true;
try{
var responseTyp = jsonObjArr[b].response;
var val = jsonObjArr[b].value;
if(responseTyp =='playerstate'){
try{
checkPlayerState(val);
}catch(r){}
}
else if(responseTyp =='inittrackinfo') {
try{
setNewTrackValues(val);
saveNewFileInfos(val);
}catch(c){}
}
}catch(z){}
}
}
started = false;
}
</script>
<title>EG Test</title>
</head>
<body>
<div id="Activities" selected="true">
<h2>Activities</h2>
<table>
<tr>
<td onclick="triggerEventGhost('WatchTV');">Watch TV</td>
</tr>
<tr>
<td onclick="triggerEventGhost('WatchDVD');">Watch DVD</td>
</tr>
</table>
</div>
</body>
</html>