Solved

javascript or JS calander

Posted on 2004-04-12
7
746 Views
Last Modified: 2010-08-05
I have looked for mouse over JS calander, not the new window pop up calendar.
When the user mouse over the link or button, the calendar is showed up and it can be selected month day and year. Pretty straght forward question.

Thank you
0
Comment
Question by:riskyricky1972
7 Comments
 
LVL 4

Accepted Solution

by:
g_damodar earned 100 total points
ID: 10811184
0
 
LVL 7

Expert Comment

by:mark-b
ID: 10815954
This is best of breed that I have seen:  http://dynarch.com/mishoo/calendar/
0
 
LVL 2

Expert Comment

by:iloya
ID: 10820329
Its is easy to convert a pop up calendar into a mouse over calendar using a hidden DIV element and loading the calendar in that DIV.  Only problem is that you'll have to do some extra coding for positioning but again you can always have a reusable function that does that.  I am ready to help you write such code if you give me more details
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:riskyricky1972
ID: 10823718
Where can I download js file. Plus when it does not offer mouseout function.

iloya: You can want to check mark-b web links

0
 
LVL 7

Expert Comment

by:mark-b
ID: 10825887
You can download the calendar I mentioned at: http://prdownloads.sourceforge.net/jscalendar/jscalendar-0.9.6.zip?download

As far as mouseOut and mouseOver goes- here's one way you can do it with this calendar:

1)  For the mouseover, when you call the Calendar.setup constructior, add the value pair:
              eventName     : "mouseover"

For example: In the test-position.html (root directory the distribution) change:

            Calendar.setup({
              inputField    : "cal-field-1",
              button         : "cal-button-1",
              align           : "Tr"
            });

to

            Calendar.setup({
              inputField    : "cal-field-1",
              button         : "cal-button-1",
              align           : "Tr",
              eventName  : "mouseover"
            });

This will make the mouseover on the '...' button pop up the calendar.

2) For the mouseout, you will have to modify the calendar.js file:

 a) Add a js function in this file (calendar.js):

    Calendar.calMouseOut = function(ev) {
      var el = Calendar.getTargetElement(ev);
      if ( el && el.id == 'someId' ) {
        window.calendar.callCloseHandler();
        Calendar.stopEvent(ev);
      }
    };

 b) Find the function in the calendar.js file that has this signature:
       Calendar.prototype.create = function (_par) :
 
     There is a block of code in this function that looks like this:

     if (this.isPopup) {
        div.style.position = "absolute";
        div.style.display = "none";
     }

     we need to add two lines in this block to fire the mouseout event:

     if (this.isPopup) {
        div.style.position = "absolute";
        div.style.display = "none";
->    div.id='someId';
->    calendar.addEvent(div, "mouseout", Calendar.calMouseOut);
     }

That's it.  Now the calendar will pop up when the mouse is over the button and it will disappear when the mouse is moved out of the calendar.
0
 
LVL 7

Expert Comment

by:mark-b
ID: 10978379
Did this work for you or is there a problem?
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 10993255
riskyricky1972  Last 10 Grades Given: C C C C C C C C C C
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now