473,379 Members | 1,317 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

How do I create a POP-UP Calender in JavaScript?

I require to click on a calender icon which in fact brings up a pop-up calender, which I then select to populate the drop down boxes - I'm buliding a site on a hotel booking system hence require this.

I require the following to be populated, once user selects the date from the pop-up calender:

[HTML]Arriving
&nbsp&nbsp<SELECT NAME id="arriveDay">
<Option value="" >01</option>
<Option value="" >02</option>
<Option value="" >03</option>
<Option value="" >04</option>
</SELECT>
<SELECT NAME id="arriveMonth">
<Option value="" >October 2007</option>
<Option value="" >Noverber 2007</option>
<Option value="" >Noverber 2007</option>
<Option value="" >January 2008</option>
<Option value="" >Feburary 2008</option>
</SELECT>[/HTML]

Also is there an easier way to write out the options for the drop down? i.e. 1..31 days
Oct 12 '07 #1
3 1400
dmjpro
2,476 2GB
I require to click on a calender icon which in fact brings up a pop-up calender, which I then select to populate the drop down boxes - I'm buliding a site on a hotel booking system hence require this.

I require the following to be populated, once user selects the date from the pop-up calender:

[HTML]Arriving
&nbsp&nbsp<SELECT NAME id="arriveDay">
<Option value="" >01</option>
<Option value="" >02</option>
<Option value="" >03</option>
<Option value="" >04</option>
</SELECT>
<SELECT NAME id="arriveMonth">
<Option value="" >October 2007</option>
<Option value="" >Noverber 2007</option>
<Option value="" >Noverber 2007</option>
<Option value="" >January 2008</option>
<Option value="" >Feburary 2008</option>
</SELECT>[/HTML]

Also is there an easier way to write out the options for the drop down? i.e. 1..31 days
Try some code first, then come here buddy !

Debasis Jana
Oct 12 '07 #2
I've tried the following however nothing is displayed:

Expand|Select|Wrap|Line Numbers
  1. <script>
  2. var call = new CalendarPopup();
  3. document.write(call);
  4. </script>
Oct 12 '07 #3
acoder
16,027 Expert Mod 8TB
Is the calendar popup a real popup window using window.open()? If it is, use window.opener to access the parent window. Use document.getElementById to access the object so you could have:
Expand|Select|Wrap|Line Numbers
  1. window.opener.document.getElementById("arriveDay").value=dayValue;
Oct 15 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Will | last post by:
Hi, Sorry to be a pest... But I can figure this out. I'm pushing to a stack. then I need to check to see if the word is a palindrome. Is the code below correct? if so, how can I check the...
7
by: Wolfgang Kreuzer | last post by:
Hello all, I have two tables - Projects and ProjectStruct Table Projects contains master records of the projects, ProjectStruct allows to define a project herarchie and contains the fields...
15
by: Stig Brautaset | last post by:
Hi group, I'm playing with a little generic linked list/stack library, and have a little problem with the interface of the pop() function. If I used a struct like this it would be simple: ...
17
by: Ralph | last post by:
Hi all, Recently I have tried to create a static lib using MS VC++. The following are some of the excerpt of my codes: ********* MyFirstStaticLib.c ******************* #include...
4
by: wil | last post by:
Dear All, In the linux platform, is there anyway I can in a C program change the file create date? Thanks, wil.
9
by: Surrealist | last post by:
I need something likes as when I create an event procedure. I can use top-left and top-right dropdown list of code editor to select object and its exposed events respectively. Then, the IDE,...
3
by: teddysnips | last post by:
I have a need to create a database, and then populate it. However, the code below doesn't work as I hoped it might (it creates the table in the "master" database, which is Not A Good Thing). I...
25
by: Nicholas Parsons | last post by:
Howdy Folks, I was just playing around in IDLE at the interactive prompt and typed in dir({}) for the fun of it. I was quite surprised to see a pop method defined there. I mean is that a...
7
by: Scott | last post by:
As said before I'm new to programming, and I need in depth explaination to understand everything the way I want to know it, call it a personality quirk ;p. With pop() you remove the last element...
1
by: Joe, G.I. | last post by:
I'm new to boost and what I'm doing seems very simple, but I can't get it. I want to store 3 events onto a priority_queue and have them execute n seconds from the time they were created, n is a...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.