On Apr 18, 11:55 am, Steve <tinker...@gmail.comwrote:
Quote:
Hi;
>
I'm working on a demo of using a timer on a web site that is made
visible by making a div visible.
>
My "PopIn Box" div is empty on the page. Before making it visible I
used javascript to get the content from another hidden div. I'm
doing it this way to make it easier to add in more messages by simply
putting more hidden divs on the page.
>
My timer function showtime(), at the end, writes the countdown into
the status bar and into the span called "clock" which is inside a
hidden div "content".
>
This works great in IE 7 and in the latest Firefox. It does not work
for Opera or Safari for windows. These browsers can't seem to reach
the span nested in the div, moving the content around between divs as
I am.
You don't move it, you copy it.
Quote:
Any ideas why or suggestions for a work around. My sample HTML file
is below the "========" so anyone who wants to take a look can paste
it into a file to play with it.
You create two divs called 'clock', which is invalid HTML so all bets
are off.
[...]
Quote:
//------------------------------------------------------------------------------
// Output time to the span in the div
function showtimeInClock()
{
>
var divClock = document.getElementById("clock");
divClock.innerHTML = document.TimerForm.sysTimer.value;}
>
//-----------------------------------------------------------------------------
function showPopIn()
{
var pop_in = document.getElementById("divPopIn");
var content = document.getElementById("content");
pop_in.innerHTML = content.innerHTML;
>
pop_in.style.display = "block";}
Now there are two elements with an ID of clock.
[...]
Quote:
<!-- Content to put in the "PopIn" box -->
<div id="content" style = "display:none;">
<p style = "text-align:center;font-size:150% !important;font-
weight:bold;color:red;">
<u>Count Down:</uin
<span id = "clock" style = "position:center;padding-right:
4px;">
</span>
(min:sec)
<p>
</div>
[...]
--
Rob