Note that there are some explanatory texts on larger screens.

plurals
  1. POCountdown -> Redirect -> Reset
    primarykey
    data
    text
    <p>I tried to make a countdown that when finishes redirects to another url (even if i'm not online on page, this page i want to redirect to, does something) then resets countdown.</p> <p>Here is the countdown:</p> <pre><code>&lt;HTML&gt; &lt;HEAD&gt; &lt;TITLE&gt;Countdown&lt;/TITLE&gt; &lt;SCRIPT LANGUAGE="JavaScript"&gt; var eventdate = new Date("May 19, 2013 21:00:00"); function toSt(n) { s="" if(n&lt;10) s+="0" return s+n.toString(); } function countdown() { cl=document.clock; d=new Date(); count=Math.floor((eventdate.getTime()-d.getTime())/1000); if(count&lt;=0) {cl.hours.value="--"; cl.mins.value="--"; cl.secs.value="--"; return; } cl.secs.value=toSt(count%60); count=Math.floor(count/60); cl.mins.value=toSt(count%60); count=Math.floor(count/60); cl.hours.value=count; setTimeout("countdown()",500); } // end hiding script--&gt; &lt;/SCRIPT&gt; &lt;/HEAD&gt; &lt;BODY onLoad="countdown()"&gt; &lt;FONT FACE="arial, helvetica" SIZE="-1"&gt; &lt;CENTER&gt; &lt;P&gt; &lt;FORM name="clock"&gt; &lt;TD ALIGN=CENTER&gt;&lt;INPUT name="hours" size=0&gt;&lt;/TD&gt; : &lt;TD ALIGN=CENTER&gt;&lt;INPUT name="mins" size=0&gt;&lt;/TD&gt; : &lt;TD ALIGN=CENTER&gt;&lt;INPUT name="secs" size=0&gt;&lt;/TD&gt; &lt;TD ALIGN=CENTER&gt;&lt;B&gt;Hours&lt;/B&gt;&lt;/TD&gt; &lt;/FORM&gt; &lt;/CENTER&gt; &lt;/BODY&gt; &lt;/HTML&gt; </code></pre> <p>I have tried somehing like this:</p> <pre><code> if(count=0){&lt;META HTTP-EQUIV="refresh" CONTENT="0;URL=http://www.example.com/"&gt;} </code></pre> <p>but it needs to be inserted in the HEAD, and it just redirects Please help me... You can do this in php, html or any language where this will work.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload