javascript
Brief description  about Online courses   join in Online courses
View Aman  Deep 's Profile

MEETING SCREEN

HOW CAN I MAKE A MEETING SCREEN IN SO THAT IT ASK ME TIME FOR MEETING, TOPIC OF MEETING , AND WHEN I SUBMIT IT NEW PAGE WILL APPEAR WITH COMPANY LOGO AND ANIMATION WHICH SHOWS MEETING AT TIME .. AND TOPIC OF MEETING.
Asked by Aman Deep | Jun 4, 2012 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Aman Deep,

Please check this below code for time difference:

<html>
<head>

<script type = "text/javascript">

function difference(){

var stime = parseInt(document.getElementById("startTime").value);
var etime = parseInt(document.getElementById("endTime").value);

if (isNaN(stime) || stime > 23 || stime <0) {
alert ("Invalid start time");
document.getElementById("startTime").value = "";
return false;
}

if (isNaN(etime) || etime > 23 || etime <0) {
alert ("Invalid end time");
document.getElementById("endTime").value = "";
return false;
}

if (etime>=stime) {
var diff = (etime-stime);
}
else {
var diff = Math.abs(stime-etime-24);
}

document.getElementById("hour").value = diff;

}
</script>

</head>

<body>

Start Time Hours <input type = "text" size = "2" maxlength = "2" id = "startTime"><br>
End Time Hours <input type = "text" size = "2" maxlength = "2" id = "endTime"><br>

<input type = "button" value= "Get hours Difference" onclick = "difference()"><br><br>

<tr>
<td align="left">Number of Hours Difference <input type="text" id="hour" readonly size="2">

</td>
</tr>

</body>
</html>
Jun 7, 2012