PDA

View Full Version : Trying to add a iphone web interface


KayJay
10-25-2010, 04:50 PM
this is what my friends trying to do:

hi pl i have the webIF interface on my AZBox and i am trying to ad a page i can use as a remote controle from my iphone am rearly there but when i click a button it gose to a blank page. i would like it to automatikly come strate back to iphone.html after pressing a button any help would be appreciated

i am not sure what this is in red so it may need to be removed or edited ??


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>iPhone Navigation</title>
<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<style type="text/css" media="screen">@import "iphonenav.css";</style>
<script type="application/x-javascript" src="iphonenav.js"></script>
</head>
<script>
function key(code)
{
document.location="cgi-bin/RC?" + code;
if (1)
window.setTimeout("capture()", 200);
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
</script>
<body>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/remote.png" height="480" width="320" border="0" alt="Remote Control" usemap="#remotecontrol" />
<map name="remotecontrol">
<area shape="circle" coords="53,30,25" href="javascript:key('INFO')" alt="INFO" />
<area shape="circle" coords="146,30,23" href="javascript:key('WAKEUP')" alt="WAKEUP" />
<area shape="rect" coords="211,5,266,55" href="javascript:key('HOME')" alt="HOME" />
<area shape="rect" coords="42,78,107,128" href="javascript:key('MENU')" alt="MENU" />
<area shape="circle" coords="242,102,23" href="javascript:key('CHECK')" alt="CHECK" />
<area shape="circle" coords="258,353,22" href="javascript:key('BLUE')" alt="BLUE" />
<area shape="circle" coords="192,353,21" href="javascript:key('YELLOW')" alt="YELLOW" />
<area shape="circle" coords="124,353,21" href="javascript:key('GREEN')" alt="GREEN" />
<area shape="circle" coords="58,354,21" href="javascript:key('RED')" alt="RED" />
<area shape="rect" coords="218,250,271,304" href="javascript:key('EXIT')" alt="EXIT" />
<area shape="rect" coords="39,254,99,302" href="javascript:key('GUIDE')" alt="GUIDE" />
<area shape="rect" coords="128,157,189,219" href="javascript:key('OK')" alt="OK" />
<area shape="rect" coords="127,393,185,453" href="javascript:key('VOLDOWN')" alt="VOLDOWN" />
<area shape="rect" coords="220,394,281,456" href="javascript:key('VOLUP')" alt="VOLUP" />
<area shape="rect" coords="20,393,100,452" href="javascript:key('MUTE')" alt="MUTE" />
<area shape="circle" coords="75,189,35" href="javascript:key('LEFT')" alt="LEFT" />
<area shape="circle" coords="240,188,37" href="javascript:key('RIGHT')" alt="RIGHT" />
<area shape="circle" coords="157,110,37" href="javascript:key('UP')" alt="UP" />
<area shape="circle" coords="160,264,36" href="javascript:key('DOWN')" alt="DOWN">
</map></td>
<td>
</body>
</html>

here is the image i am useing for the buttons

http://unlocker-forums.co.uk/attachment.php?attachmentid=28116&d=1286122087

Anyone know what he's talking about? Any help would be much appriciated, Thanks in Advance

KayJay

Apostropartheid
10-25-2010, 07:54 PM
Have you ever considered using a spellchecker?

The bit you highlighted in red is a shoddy implementation of an image rollover probably applied in Dreamweaver. To do what (I think, it was quite difficult to understand) I think you want to, you have to edit cgi-bin/RC to redirect you once the function is completed, or you could use AJAX.