473,652 Members | 3,123 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

55 New Member
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<SELE CT 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 1415
dmjpro
2,476 Top Contributor
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<SELE CT 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
divina11
55 New Member
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 Recognized Expert Moderator MVP
Is the calendar popup a real popup window using window.open()? If it is, use window.opener to access the parent window. Use document.getEle mentById 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
23193
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 entire word?
7
9671
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 PrjStructId, ProjectId, PrjStructName, ..., ParentId PrjStructParent contains a reference to the parent or to itselves if record is top-level-record for a project.
15
4148
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: struct node { struct node *next; void *data; };
17
2186
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 <stdlib.h> #include <string.h>
4
6534
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
12609
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, automatically paste the function header (signature) for me. But I can't find a way to see list of Sub or Function that I can overrides such as ToString Function.
3
5804
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 know already (thanks Tony!) that if you use Dynamic SQL for the USE command, then the subsequent operations need to be Dynamic SQL as well, which is a pity since there are over 11,000 lines of it and I don't really fancy debugging it! Does...
25
4190
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 misnomer or what? From the literature, pop is supposed to be an operation defined for a stack data structure. A stack is defined to be an "ordered" list data structure. Dictionaries in Python have no order but are sequences. Now, does anyone know...
7
24931
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 of a list and return its value: Now I know list is a bad name, but for the sake of arguement lets assume its not a built in sequence> 'example'
1
2926
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 randomly generated amount of time between 0 and 10 seconds. // create container that holds function objects priority_queue<boost::function<void (Event) pq; // create 3 events and place in priority_queue
0
8367
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8279
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8811
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8703
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
5619
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4145
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2703
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1591
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.