Current location: Hot Scripts Forums » General Web Coding » JavaScript » Javascript Countdown script

Javascript Countdown script

Reply
  #1 (permalink)  
Old
New Member
 
Join Date: Feb 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Javascript Countdown script

Hello

I've been searching on the internet and on hotscripts for a javascript countdown script
that can handle using seconds then within the script change the seconds over to
the hour, minute, second format but haven't had any luck in doing so. Does anyone
know where I can get such a script since I have very little knowledge in using or even
writing javascript ..

I did find this script that combines both javascript and PHP but again, I'm not sure
exactly how to change this code to do mentioned above:

Code:
// Update counter

$mySEC = 300;
?>
  <script language="javascript" type="text/javascript">
   var myi = <?=$mySEC?>;
   setTimeout("rmyx();",1000);

   function rmyx()
    {
     myi = myi - 1;
     if (myi <= 0)
      {
      myi = <? echo ($sched_ticks * 60); echo "\n";?>
      }
     document.getElementById("myx").innerHTML = myi;
     setTimeout("rmyx();",1000);
    }
  </script>
<?
echo "  <b><span id=myx>$mySEC</span></b> until_update <br>\n";
// End update counter
The code above counts down from 300 seconds to 0 then does whatever ..
it would work FINE if I can code in to change the 300 seconds to the
hour, minute, second format ..

Thanks for your help
Reply With Quote

Featured Marketplace Scripts (view more)

  • Simple Forum PHP

    Simple Forum PHP script - easy to put on your website

  • File Watch

    This script monitors your website files for any changes.

  • Javascript iTunes Store …

    Instantly generate your own Customized Niche Store for Top Charting iTunes, …

  • MobileClone

    Your Own Mobile Store with AT&T, Sprint, T-Mobile, Verizon...

Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash Countdown Script rocky3023 Flash & ActionScript 0 07-31-06 05:03 PM
"Set Homepage" script in JavaScript superprogrammer Job Offers & Assistance 13 03-09-06 03:33 AM
Know a link to a good Log in script? (I'm Horrible with javascript) HoT DaWg Script Requests 2 01-10-05 02:25 PM


All times are GMT -5. The time now is 02:19 PM.
vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.