Author Topic: Request for a date/month countdown script.  (Read 15399 times)

Tayab

  • Full Member
  • ***
  • Posts: 149
Request for a date/month countdown script.
« on: October 05, 2012, 05:25:19 AM »
So I was looking for a countdown script of date and month of JavaScript, explained at below.


I've created a script of giving the Birthday information after typing the name in the prompt, the script is added as under.

Code: [Select]
<script type="text/JavaScript">

var myName = prompt ("Enter a name with first name Capitalized."."");
   
     if (myName == "Tayab")
     
     {
     document.write('You were looking for Tayab\'s Birthday. It's on 20-Oct-1996');
     }

     if (myName == "Joseph")
     {
     document.write('You were looking for Joseph\'s Borthday. It's on 12-Sept-1995');
      }

     else
       {
      alert('You haven't entered the valid name or we don't have that name in our directory');
      window.close ()
        }
</script>
 
Although, there is written the date of birth and next to it I want the script to say how many days/months are left of your birthday to come. I am really keen how is it going to work. I'd be more than thankful if someone volunteer and make that script with the comments so that I can understand what actually going on.


Thanks for reading
- Tayab.

 

X

Do you know?

IfAndBut.com gives you a platform where you can ask questions related to web and internet..
So, why wait..
Join Now!