www.webdeveloper.com
Results 1 to 2 of 2

Thread: Simple question from a beginner

  1. #1
    Join Date
    Oct 2009
    Posts
    1

    Simple question from a beginner

    Hello,
    I am very new to javascript and just have a simple questions that can probably be answered in a matter of seconds.

    I am using a clickable calendar and want the user to be redirected according to the date that they pick (which will correspond with the name of a folder on my server)

    so what I have established that I need window.location

    However, I want to add a variable to the end. So if the variable "date" equals "20091001" (Oct 1), i would want the user to be sent to http://www.mysite.com/20091001.

    this is what i have tried:

    window.location = "http://www.mysite.com/" + 'date'


    I really dont know what I'm doing though.


    Thanks for any help.

  2. #2
    Join Date
    Apr 2006
    Location
    Houston
    Posts
    1,374
    Leave off the single tick marks around the variable.

    It should be:
    window.location = "http://www.mysite.com/" + date

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles