Connecting Tech Pros Worldwide Forums | Help | Site Map

calender redirect

Newbie
 
Join Date: Jun 2007
Posts: 1
#1: Jun 6 '07
I am after a script that will redirect the user to another page (open in new window) after adding certain dates.

for example,

I have a drop down list with check in and check out dates.
I put in check in date of 3/7/07 and check out 5/07/07 (and this may also be done in a calender pop up.) when I click search, it then takes me to a page which has those dated in the URL
eg. http://www.widgets.com/hotel07-07-03_07-07-05.htm

I hope this is not as unclear as I think it is.

thanks in advance.

acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Jun 6 '07

re: calender redirect


continuum, welcome to TSDN!

Assuming you have your dates in date1 and date2 in the correct format, try:
Expand|Select|Wrap|Line Numbers
  1. location.href='http://www.widgets.com/hotel'+date1+'_'+date2+'.htm';
Reply


Similar JavaScript / Ajax / DHTML bytes