All source code in Java/ Javascript Ask a Java/ Javascript Pro Discussion Forum Categories All jobs in Java/ Javascript
CSS,popup,calendar,linked,form,text,field,use
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Java/ Javascript Stats

 Code: 484,040. lines
 Jobs: 194. postings

 How to support the site

 
Sponsored by:
Quick Search for:  in language:    
You are in:
 
Login





Latest postings for Java/ Javascript.
Click here to see a screenshot of this code!My First Struts2 Application
By nagesh borate on 2/7

(Screen Shot)

Click here to see a screenshot of this code!Peg solitaire
By Mario Segura on 2/4

(Screen Shot)

Simple TicTacToe
By Atishay Jain on 2/4


moon info
By marcojetson on 2/3


Click here to see a screenshot of this code!SLOT MACHINE
By Husain Limdiyawala on 2/1

(Screen Shot)

Click here to see a screenshot of this code!NLabs' Password Generator
By nagesh borate on 2/1

(Screen Shot)

DragAndDrop
By Masood Fallahpoor on 1/30


Click here to see a screenshot of this code!HTML Learning By Azhar Khan
By Azhar Khan Website Designer on 1/30

(Screen Shot)

Beautiful Graphics applet
By Tejas Jayantilal Gandhi on 1/28


Click here to see a screenshot of this code!The Picture Grapher 2010 beta
By ROD LEWIS on 1/26

(Screen Shot)

xo
By ahmed wagih on 1/26


Click here to see a screenshot of this code!Mobile Tracer by Azhar Khan
By Azhar Khan Website Designer on 1/26

(Screen Shot)

Click here to see a screenshot of this code!tic tac toe AI with multiple difficulties
By Michael Nipper on 1/23

(Screen Shot)

Click here to see a screenshot of this code!A Basic tutorial on JavaScript and HTML
By Ronald Holland on 10/27

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!



 
 
   

Advanced Popup Calendar

Print
Email
 
winzip icon
Submitted on: 1/3/2003 7:12:02 PM
By: db_pro 
Level: Beginner
User Rating: By 18 Users
Compatibility:JavaScript

Users have accessed this code 51519 times.
 
 
     This popup calendar can be linked to a form text field. The user can click on an icon of a desk calendar and use a popup window to select a date. This calendar was originally designed by Robert Husted and posted as a Netscape JavaScript tutorial article. It supports Netscape and IE senses the user's language settings and automatically displays the calendar in English, French, German, or Spanish. The font and other customizations can be made by editing the first few lines of the .js file.<p> I've since made the following improvements: Reduced the .js file size to from 29k to 13k. Fixed a CSS bug when IE 5 came out. Added support for reading and writing of advanced date formats. My favorite addition is the "th" format flag that translates to "st", "nd", "rd", or "th" depending on day of month.<p> There is one part that could use help. Currently in IE it opens, closes, and then re-opens. This is the only answer I could find to the problem of re-opening the window. Without this workaround, if the popup calendar is already open, and the user clicks to open it, it can get disconnected and looses it's ability to communicate with the main window. In the customizable section of the .js file, you can set cal_opentwice to false to turn this off. If someone finds a better way.. please post it here.

 

HTML:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!

//**************************************
//     
//HTML for :Advanced Popup Calendar
//**************************************
//     
.<BR>
.<BR>
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
 
 Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:
 
Your Vote!

What do you think of this code(in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
5/5/2003 12:22:50 PM

a very good and useful program
(If this comment was disrespectful, please report it.)

 
11/11/2003 3:38:51 PM

this is a great calendar, but I cannot get it to move from the upper left hand corner to another position on the screen. Any ideas?
(If this comment was disrespectful, please report it.)

 
11/11/2003 6:13:01 PMdp_pro

While the height and width of the calendar window is easy to find at the top of the calendar.js file, the command that opens the window is on line 194 at the bottom of the showCalendar function. The upper left corder of the window currently opens 200 pixels from the left and 300 pixels from the top. These numbers could be replaces with JavaScript variables, but you would have to be comfortable with JavaScript.

As a hint.. check out the event object and the event.clientX / event.clientY properties. They tell you where on the screen the mouse was when the click happened. Also check out the screen object, a couple of its properties will tell you the height and width of the user's monitor which will be needed if you want to center the window.

(If this comment was disrespectful, please report it.)

 
3/25/2004 5:58:14 AM

I have found another workaoround for ie
and I wish to send you my code
Please let me know an email address to send it.
Regards
Silvia De Sinopoli
Software Products Italia
(If this comment was disrespectful, please report it.)

 
4/5/2004 5:21:57 PM

I am having trouble with the calendar script using Netscape 7.1. The calendar popup window appears with the month view, but if I press one of the buttons to change the month, the month view disappears. I cannot get the month back unless I close the window and click the calendar icon to pop the window back up. I do not have any problem with the calendar using IE 6.0. Has anyone else experienced this problem on Netscape and is there a fix?
(If this comment was disrespectful, please report it.)

 
11/29/2004 5:25:54 AM

Pop up blockers, namely the Yahoo! pop up blocker, are not letting the calendar come up. Is it possible to convert the code so that the calendar is loaded in the same page but on a different layer? Thanks!
(If this comment was disrespectful, please report it.)

 
12/1/2004 2:07:53 PMdp_pro

Since the time if making this calendar, I have been impressed with some other calendars that have come out that use layers instead of a pop-up window. One that comes to mind is at http://www.mattkruse.com/javascript/calendarpopup/ (take a look at the DIV-style examples) His code is 35k and doesn't have built-in multi-language or the advanced date formatting that mine does, but might help avoid the popup blocker problem.
(If this comment was disrespectful, please report it.)

 
1/20/2005 6:11:26 PM

I can't reopen the calendar popup once it's already open. The only way I can reopen the calendar is if I close it out. I'm using IE 5.5 and I'm calling the showCalendar() function instead of using the calendar.html frameset document. Could this be the problem?
(If this comment was disrespectful, please report it.)

 
3/8/2005 4:48:18 PM

I found a way to stop the open close open for IE. add calWin in the var statement at line 54 then replace lines 191-197 with the following:
if(calWin == null || calWin.closed)
{
calWin = window.open('javascript:opener.calDocFrameset','calWin','dependent=yes,'+windowSize+',screenX=200,sc reenY=300,titlebar=yes');
}
else
{
calWin.close();
calWin = window.open('javascript:opener.calDocFrameset','calWin','dependent=yes,'+windowSize+',screenX=200,sc reenY=300,titlebar=yes');
}
if (isNav) calWin.focus();
}

(If this comment was disrespectful, please report it.)

 
4/14/2005 2:25:12 AM

exactly what i need!
(If this comment was disrespectful, please report it.)

 
8/29/2005 7:14:20 PMPhamer

Works great in IE, but doesn't work in Firefox...Any idea what needs to be changed to get it to work on Firefox?
(If this comment was disrespectful, please report it.)

 
9/26/2005 11:45:26 PMkaie666hehe

please send me the source code to my email...
(If this comment was disrespectful, please report it.)

 
9/27/2005 1:12:02 AMdp_pro

The latest version is available at http://www.catalystwebapps.com/JavaScriptCalendar.zip It works in Firefox (except the window needs to be a bit wider for the next year button to fit) It also comes with an example ColdFusion custom tag to make it easy to use.
(If this comment was disrespectful, please report it.)

 
11/26/2006 1:36:06 AMshivakumar

The Name it self express it's an Planet for code for any programmer!
(If this comment was disrespectful, please report it.)

 
3/7/2008 9:22:09 AMsolos

this is wonderful. pls weldone
(If this comment was disrespectful, please report it.)

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author from the email account you registered on the site, so you can correspond directly.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
To post feedback, first please login.


 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Games | Feedback | Customize | Java/ Javascript Home | Site Home | Other Sites | Open Letter from Moderators | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997-2010 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.   Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. Exhedra solutions has no affiliation with Sun Microsystems, Inc.. Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.