Kevin
03-16-2003, 08:04 PM
Can you take a look at the script and tell me why the timer dosent' display in the status bar correctly. Should be a count down.
<html><head><title></title>
<script>
var count = 15;
function countDown (count) {
count--;
if(!count)
{
clearInterval (myTimer);
self.close();
}
return count;
}
var myTimer = setInterval ( "countDown(count)", 1000 );
window.status ="this window closes in " + count + " seconds"
</script>
</head><body>
<FORM name="myForm">
<table>
<tr>
<th>Choose the background color of the main window:</th>
<td><select name="BkGrnd" onchange="opener.changeBgColor(this)";>
<option value="red">Red</option>
<option value="blue">blue</option>
<option value="green">green</option>
<option value="yellow">yellow</option>
<option value="orange">orange</option>
<option value="black">black</option>
<option value="white" selected>white</option>
</select>
</td>
</tr>
<tr>
<th>Choose the text color of the main window:</th>
<td><select name="ForeGrnd" onchange="opener.changeFgColor(this)";>
<option value="red">Red</option>
<option value="blue">blue</option>
<option value="green">green</option>
<option value="yellow">yellow</option>
<option value="orange">orange</option>
<option value="black" selected>black</option>
<option value="white">white</option>
</select>
</td></tr></table>
</FORM></body></html>
insight always appreciated
Thank You
Kevin
<html><head><title></title>
<script>
var count = 15;
function countDown (count) {
count--;
if(!count)
{
clearInterval (myTimer);
self.close();
}
return count;
}
var myTimer = setInterval ( "countDown(count)", 1000 );
window.status ="this window closes in " + count + " seconds"
</script>
</head><body>
<FORM name="myForm">
<table>
<tr>
<th>Choose the background color of the main window:</th>
<td><select name="BkGrnd" onchange="opener.changeBgColor(this)";>
<option value="red">Red</option>
<option value="blue">blue</option>
<option value="green">green</option>
<option value="yellow">yellow</option>
<option value="orange">orange</option>
<option value="black">black</option>
<option value="white" selected>white</option>
</select>
</td>
</tr>
<tr>
<th>Choose the text color of the main window:</th>
<td><select name="ForeGrnd" onchange="opener.changeFgColor(this)";>
<option value="red">Red</option>
<option value="blue">blue</option>
<option value="green">green</option>
<option value="yellow">yellow</option>
<option value="orange">orange</option>
<option value="black" selected>black</option>
<option value="white">white</option>
</select>
</td></tr></table>
</FORM></body></html>
insight always appreciated
Thank You
Kevin