Pink and my IPOD
Jay Bedard
Posts: 4
I have a pink card serving a web site and relaying info to a basic stamp. The web stuff works fine on ie8 but will not work on the safari on my ipod. I am updating the varaibles useing the form post method. Here is a sample of the code for the pink web. Does anybody see something I am missing?
<html>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<body>
<script type="text/javascript">
function FormSubmit()
{
document.getElementById("firstry").submit()
}
var status="<Nb_varSV>";
var ipaddr = "<Nb_varSI>";
var testit1 = "<Nb_var01>";
var testit2 = "<Nb_var02>";
var testit3 = "<Nb_var03>";
var TimeOfDay = "<Nb_var10>";
var testit11 = "<Nb_var11>";
var WeekDay = "<Nb_var12>";
var TheDate = "<Nb_var13>";
var theday=["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday","Friday","Saturday"];
if (testit1==10)
{
//document.write("The Red Led Should be on <br>");
RedOnString='<input name="Nb_var01" type="radio" value="10" checked onclick="FormSubmit()"></input>'
RedOffString='<input name="Nb_var01" type="radio" value="11" onclick="FormSubmit()"></input>'
RedLedBlink ='<input name="Nb_var01" type="radio" value="12" onclick="FormSubmit()" ></input>'
}
else if (testit1==11)
{
//document.write("The Red Led Should be Off");
RedOnString='<input name="Nb_var01" type="radio" value="10" onclick="FormSubmit()"></input>'
RedOffString='<input name="Nb_var01" type="radio" value="11" checked onclick="FormSubmit()"></input>'
RedLedBlink ='<input name="Nb_var01" type="radio" value="12" onclick="FormSubmit()" ></input>'
}
else if (testit1==12)
{
//document.write("The Red Led Should Blink");
RedOnString='<input name="Nb_var01" type="radio" value="10" onclick="FormSubmit()"></input>'
RedOffString='<input name="Nb_var01" type="radio" value="11" onclick="FormSubmit()"></input>'
RedLedBlink ='<input name="Nb_var01" type="radio" value="12" checked onclick="FormSubmit()"></input>'
}
else
{
//document.write("No Red Led Selection");
RedOnString='<input name="Nb_var01" type="radio" value="10" onclick="FormSubmit()"></input>'
RedOffString='<input name="Nb_var01" type="radio" value="11" onclick="FormSubmit()"></input>'
RedLedBlink ='<input name="Nb_var01" type="radio" value="12" onclick="FormSubmit()"></input>'
}
if (testit2==10)
{
//document.write("The Red Led Should be on");
GreenLedOnString='<input name="Nb_var02" type="radio" value="10" checked onclick="FormSubmit()"></input>'
GreenLedOffString='<input name="Nb_var02" type="radio" value="11" onclick="FormSubmit()"></input>'
GreenLedBlink = '<input name="Nb_var02" type="radio" value="12" onclick="FormSubmit()"></input>'
}
else if (testit2==11)
{
//document.write("The Red Led Should be Off");
GreenLedOnString='<input name="Nb_var02" type="radio" value="10" onclick="FormSubmit()"></input>'
GreenLedOffString='<input name="Nb_var02" type="radio" value="11" checked onclick="FormSubmit()"></input>'
GreenLedBlink = '<input name="Nb_var02" type="radio" value="12" onclick="FormSubmit()"></input>'
}
else if (testit2==12)
{
//document.write("There are no leds lit");
GreenLedOnString='<input name="Nb_var02" type="radio" value="10" onclick="FormSubmit()"></input>'
GreenLedOffString='<input name="Nb_var02" type="radio" value="11" onclick="FormSubmit()"></input>'
GreenLedBlink = '<input name="Nb_var02" type="radio" value="12" checked onclick="FormSubmit()"></input>'
}
else
{
//document.write("There are no leds lit");
GreenLedOnString='<input name="Nb_var02" type="radio" value="10" onclick="FormSubmit()"></input>'
GreenLedOffString='<input name="Nb_var02" type="radio" value="11" onclick="FormSubmit()"></input>'
GreenLedBlink = '<input name="Nb_var02" type="radio" value="12" onclick="FormSubmit()"></input>'
}
if (testit3==10)
{
//document.write("The Red Led Should be on");
YellowLedOnString='<input name="Nb_var03" type="radio" value="10" checked onclick="FormSubmit()"></input>'
YellowLedOffString='<input name="Nb_var03" type="radio" value="11" onclick="FormSubmit()"></input>'
YellowLedBlink = '<input name="Nb_var03" type="radio" value="12" onclick="FormSubmit()"></input>'
}
else if (testit3==11)
{
//document.write("The Red Led Should be Off");
YellowLedOnString='<input name="Nb_var03" type="radio" value="10" onclick="FormSubmit()"></input>'
YellowLedOffString='<input name="Nb_var03" type="radio" value="11" checked onclick="FormSubmit()"></input>'
YellowLedBlink = '<input name="Nb_var03" type="radio" value="12" onclick="FormSubmit()"></input>'
}
else if (testit3==12)
{
//document.write("There are no leds lit");
YellowLedOnString='<input name="Nb_var03" type="radio" value="10" onclick="FormSubmit()"></input>'
YellowLedOffString='<input name="Nb_var03" type="radio" value="11" onclick="FormSubmit()"></input>'
YellowLedBlink = '<input name="Nb_var03" type="radio" value="12" checked onclick="FormSubmit()"></input>'
}
else
{
//document.write("There are no leds lit");
YellowLedOnString='<input name="Nb_var03" type="radio" value="10" onclick="FormSubmit()"></input>'
YellowLedOffString='<input name="Nb_var03" type="radio" value="11" onclick="FormSubmit()"></input>'
YellowLedBlink = '<input name="Nb_var03" type="radio" value="12" onclick="FormSubmit()"></input>'
}
</script>
<form id="firstry" method="post" action="index.htm">
<table border="6" bgcolor=#D4D9DE cellpadding="10">
<tr>
<th colspan = "4" ><h2>Home Device Controller<br></h2>
<script>document.write("Time: " + TimeOfDay)</script><br>
<script>document.write("Date: " + theday[WeekDay]+" "+ TheDate)</script><br>
<script>document.write("Local IP addr: "+ipaddr)</script>
</tr>
<tr>
<th>Outputs
<td>On</td>
<td>Off</td>
<td>Schedule</td>
</tr>
<tr>
<th>Unit #1 - Green Led</th>
<td>
<script>document.write(GreenLedOnString)</script>
</td>
<td>
<script>document.write(GreenLedOffString)</script>
</td>
<td>
<script>document.write(GreenLedBlink)</script>
</td>
</tr>
<tr>
<th>Unit #2 - Family Room Light #1</th>
<td>
<script>document.write(RedOnString)</script>
</td>
<td>
<script>document.write(RedOffString)</script>
</td>
<td>
<script>document.write(RedLedBlink)</script>
</td>
</tr>
<tr>
<th>Unit #3 - Family Room Light #2</th>
<td>
<script>document.write(YellowLedOnString)</script>
</td>
<td>
<script>document.write(YellowLedOffString)</script>
</td>
<td>
<script>document.write(YellowLedBlink)</script>
</td>
</tr>
</table>
</form>
</body>
</html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<body>
<script type="text/javascript">
function FormSubmit()
{
document.getElementById("firstry").submit()
}
var status="<Nb_varSV>";
var ipaddr = "<Nb_varSI>";
var testit1 = "<Nb_var01>";
var testit2 = "<Nb_var02>";
var testit3 = "<Nb_var03>";
var TimeOfDay = "<Nb_var10>";
var testit11 = "<Nb_var11>";
var WeekDay = "<Nb_var12>";
var TheDate = "<Nb_var13>";
var theday=["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday","Friday","Saturday"];
if (testit1==10)
{
//document.write("The Red Led Should be on <br>");
RedOnString='<input name="Nb_var01" type="radio" value="10" checked onclick="FormSubmit()"></input>'
RedOffString='<input name="Nb_var01" type="radio" value="11" onclick="FormSubmit()"></input>'
RedLedBlink ='<input name="Nb_var01" type="radio" value="12" onclick="FormSubmit()" ></input>'
}
else if (testit1==11)
{
//document.write("The Red Led Should be Off");
RedOnString='<input name="Nb_var01" type="radio" value="10" onclick="FormSubmit()"></input>'
RedOffString='<input name="Nb_var01" type="radio" value="11" checked onclick="FormSubmit()"></input>'
RedLedBlink ='<input name="Nb_var01" type="radio" value="12" onclick="FormSubmit()" ></input>'
}
else if (testit1==12)
{
//document.write("The Red Led Should Blink");
RedOnString='<input name="Nb_var01" type="radio" value="10" onclick="FormSubmit()"></input>'
RedOffString='<input name="Nb_var01" type="radio" value="11" onclick="FormSubmit()"></input>'
RedLedBlink ='<input name="Nb_var01" type="radio" value="12" checked onclick="FormSubmit()"></input>'
}
else
{
//document.write("No Red Led Selection");
RedOnString='<input name="Nb_var01" type="radio" value="10" onclick="FormSubmit()"></input>'
RedOffString='<input name="Nb_var01" type="radio" value="11" onclick="FormSubmit()"></input>'
RedLedBlink ='<input name="Nb_var01" type="radio" value="12" onclick="FormSubmit()"></input>'
}
if (testit2==10)
{
//document.write("The Red Led Should be on");
GreenLedOnString='<input name="Nb_var02" type="radio" value="10" checked onclick="FormSubmit()"></input>'
GreenLedOffString='<input name="Nb_var02" type="radio" value="11" onclick="FormSubmit()"></input>'
GreenLedBlink = '<input name="Nb_var02" type="radio" value="12" onclick="FormSubmit()"></input>'
}
else if (testit2==11)
{
//document.write("The Red Led Should be Off");
GreenLedOnString='<input name="Nb_var02" type="radio" value="10" onclick="FormSubmit()"></input>'
GreenLedOffString='<input name="Nb_var02" type="radio" value="11" checked onclick="FormSubmit()"></input>'
GreenLedBlink = '<input name="Nb_var02" type="radio" value="12" onclick="FormSubmit()"></input>'
}
else if (testit2==12)
{
//document.write("There are no leds lit");
GreenLedOnString='<input name="Nb_var02" type="radio" value="10" onclick="FormSubmit()"></input>'
GreenLedOffString='<input name="Nb_var02" type="radio" value="11" onclick="FormSubmit()"></input>'
GreenLedBlink = '<input name="Nb_var02" type="radio" value="12" checked onclick="FormSubmit()"></input>'
}
else
{
//document.write("There are no leds lit");
GreenLedOnString='<input name="Nb_var02" type="radio" value="10" onclick="FormSubmit()"></input>'
GreenLedOffString='<input name="Nb_var02" type="radio" value="11" onclick="FormSubmit()"></input>'
GreenLedBlink = '<input name="Nb_var02" type="radio" value="12" onclick="FormSubmit()"></input>'
}
if (testit3==10)
{
//document.write("The Red Led Should be on");
YellowLedOnString='<input name="Nb_var03" type="radio" value="10" checked onclick="FormSubmit()"></input>'
YellowLedOffString='<input name="Nb_var03" type="radio" value="11" onclick="FormSubmit()"></input>'
YellowLedBlink = '<input name="Nb_var03" type="radio" value="12" onclick="FormSubmit()"></input>'
}
else if (testit3==11)
{
//document.write("The Red Led Should be Off");
YellowLedOnString='<input name="Nb_var03" type="radio" value="10" onclick="FormSubmit()"></input>'
YellowLedOffString='<input name="Nb_var03" type="radio" value="11" checked onclick="FormSubmit()"></input>'
YellowLedBlink = '<input name="Nb_var03" type="radio" value="12" onclick="FormSubmit()"></input>'
}
else if (testit3==12)
{
//document.write("There are no leds lit");
YellowLedOnString='<input name="Nb_var03" type="radio" value="10" onclick="FormSubmit()"></input>'
YellowLedOffString='<input name="Nb_var03" type="radio" value="11" onclick="FormSubmit()"></input>'
YellowLedBlink = '<input name="Nb_var03" type="radio" value="12" checked onclick="FormSubmit()"></input>'
}
else
{
//document.write("There are no leds lit");
YellowLedOnString='<input name="Nb_var03" type="radio" value="10" onclick="FormSubmit()"></input>'
YellowLedOffString='<input name="Nb_var03" type="radio" value="11" onclick="FormSubmit()"></input>'
YellowLedBlink = '<input name="Nb_var03" type="radio" value="12" onclick="FormSubmit()"></input>'
}
</script>
<form id="firstry" method="post" action="index.htm">
<table border="6" bgcolor=#D4D9DE cellpadding="10">
<tr>
<th colspan = "4" ><h2>Home Device Controller<br></h2>
<script>document.write("Time: " + TimeOfDay)</script><br>
<script>document.write("Date: " + theday[WeekDay]+" "+ TheDate)</script><br>
<script>document.write("Local IP addr: "+ipaddr)</script>
</tr>
<tr>
<th>Outputs
<td>On</td>
<td>Off</td>
<td>Schedule</td>
</tr>
<tr>
<th>Unit #1 - Green Led</th>
<td>
<script>document.write(GreenLedOnString)</script>
</td>
<td>
<script>document.write(GreenLedOffString)</script>
</td>
<td>
<script>document.write(GreenLedBlink)</script>
</td>
</tr>
<tr>
<th>Unit #2 - Family Room Light #1</th>
<td>
<script>document.write(RedOnString)</script>
</td>
<td>
<script>document.write(RedOffString)</script>
</td>
<td>
<script>document.write(RedLedBlink)</script>
</td>
</tr>
<tr>
<th>Unit #3 - Family Room Light #2</th>
<td>
<script>document.write(YellowLedOnString)</script>
</td>
<td>
<script>document.write(YellowLedOffString)</script>
</td>
<td>
<script>document.write(YellowLedBlink)</script>
</td>
</tr>
</table>
</form>
</body>
</html>
Comments
What do you mean with 'do not work'?
www.uniformserver.com is good for experimenting as it doesn't require installation on your PC.
(I think you should be able to get the access logs from it. That way you can see if there's any differences in file requests from the different browsers, and what those differences might be)
Make sure that the file name is correct (.htm vs. .html), and make sure that you don't need a realtive path indicator.