Hi all. I have a problem with an onClick function working when I click a button. The infamous IE error reporting links it back to the button itself, but I don't think that's the case (Line 48, 49 - Object doesn't support this property or method). The code itself isn't complete since I just started and can finish the rest later. Anyways, here's what I have so far...
Code:
<html>
<script type="text/javascript">
// if zulu - > time is checked
var hour1 = document.time.getElementByName("hour").value;
var minute1 = document.time.getElementByName("minute").value;
parseInt(hour1);
parseInt(minute1);
function local()
{
if (hour1 > 05 & < 23)
{
hour1 = hour1 - 5;
}
else if (hour1 = 00)
{
hour1 = 19;
}
else if (hour1 = 01) //line 20
{
hour1 = 20;
}
else if (hour1 = 02)
{
hour1 = 21;
}
else if (hour1 = 03)
{
hour1 = 22;
}
else if (hour1 = 04)
{
hour1 = 23;
}
else
{
hour1 = 00;
}
document.time.hour= hour1 //line 40
}
</script>
<form name=time>
<center>
<input type="text" maxlength=2 size=2 id="hour" name="hour" ></input> :
<input type="text" maxlength=2 size=2 id="minute" name="minute"></input>
<br>
<input type="button" id="local" value="Local -> Zulu" onClick="zulu()"></input>
<input type="button" id="zulu" value = "Zulu -> Local" onClick="local()"></input><br>
</form>
</html>
Comment