Floating example broken in ie7 if proto+scriptaculous is updated

I just downloaded the floated example and spent hours debugging my own code and implementation of the floating example only to discover that the original example don't even work if you upgrade prototype to 1.6.0.2 and scripaculous to 1.8.1.

I don't know if the author of that example reads these forums, but if he does; please take a look at it.

The error happens on first click:
Line 2253 (in prototype I guess)
Char 5
Error 'style is null or not an object

On second click the calendar works again...

annoying :(

-Tommy

IE issues with floating calendar demo

jamiegrove's picture

Hi, Tommy.

I just tested the floating calendar against the latest version of prototype and scriptaculous using Firefox on OSX and XP and it still works, but sure enough IE is not working.

We have not done extensive testing against the new version of prototype and scriptaculous (we are still using 1.6 and 1.8 respectively), but we will soon.

Thanks for your contribution!

- J

No problem Jamie. With that

No problem Jamie.

With that little change it now works perfect in both IE and FF.

Have you seen the calendar in AjaxControlToolkit?
What my biggest wish was a proto+scriptaculous version that resembles the same functionality when it comes to changing months and year. I find it very userfriendly!

See http://asp.net/AJAX/AjaxControlToolkit/Samples/Calendar/Calendar.aspx
Try click header of calendar then monthname.

Very nice control there! A

jamiegrove's picture

Very nice control there! A wee bit large though. Like over 10K lines of code if I'm looking at the right stuff. As I noted on a few other forum posts, the entire control is due for a refresh. I'll take this as a nice example. :) Thanks again!

possible fix

this seems to work:

//Locates the calendar over the calling control (in this example the "img").
if (source = $(source))
{
containerPos = Element.cumulativeOffset(source);
$(container).setStyle({top:containerPos.top,left:containerPos.left+20});
}

Position.clone is deprecated

excellent, i'll try that

excellent, i'll try that out. upgraded scripts also and breaks in ie6

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options