Results 1 to 1 of 1

Thread: Please help me the script code to redirect user to another page based on day of week.

  1. #1
    Join Date
    Feb 2011
    Posts
    1

    Please help me the script code to redirect user to another page based on day of week.

    Hi,

    Please i have wrote this code which is working good..here is it

    <script type="text/javascript">
    var dateobj=new Date()
    var today=dateobj.getDay()
    switch(today){
    case 1:
    window.location="monday.htm"
    break
    case 2:
    window.location="[link deleted by moderator]"
    break
    case 3:
    window.location="wednesday.htm"
    break
    case 4:
    window.location="thursday.htm"
    break
    case 5:
    window.location="friday.htm"
    break
    case 6:
    window.location="saturday.htm"
    break
    case 0:
    window.location="sunday.htm"
    break
    }
    </script>

    But please i want the code to behave like.....to create a redirection script based on day of the week.
    that reads the date of a day in one textbox, the month in a second textbox and the year in a third textbox. After submitting the form, it should display the complete date, including the correct extension on the day number ('st', 'nd', 'rd' or 'th'). Example : 2 April 1999 will produce: 'Today is 2nd of April, 1999.'


    Please that is what i want to come out with but i have try many code which i am not getting.
    Help me please.

    Thank you.
    Clement Osei.
    Last edited by alvo; 04 Mar 2011 at 05:35 PM.

Similar Threads

  1. How to auto detect user's location and redirect them to a page?
    By woodwinked in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 18 Sep 2010, 12:03 PM
  2. Form Redirect--based on zip code
    By timhersh in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 23 Apr 2010, 08:29 AM
  3. Need a script to direct user to a new page.
    By stevenbhn in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 11 Sep 2006, 07:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •