Thanks again!

I realise now that I wasn't using Datepicker with Colorbox in the best
way, effectively bringing up a modal window without involving any
links.

What I'm doing instead now is I've made an invisible anchor (with an
ID of calendar_portal) next to the calendar, and I'm telling
Datepicker to change its href attribute, and to click on it.  The
anchor's class means that Colorbox automatically gets called in.

So, with the old line commented out and two new lines replacing it:

//$(this).colorbox({href: '/view_date/' + curDate});
$('#calendar_portal').attr('href', '/view_date/' + curDate);
$('#calendar_portal').click();

This works fine the first time, as usual, but something different
happens the second time: I get an error in Firebug.

"inst is undefined
anonymous()
function onclick(event) { DP_jQuery.datepicker._selectDay("#calendar",
6, 2009, this); return false; }"

Does this mean anything to anyone? I'm afraid it's gone over my head,
it looks like some JavaScript code that came with Datepicker rather
than anything I know how to write myself.

What may also be better is somehow telling Datepicker where the
anchors should link to, instead of having an invisible anchor of my
own that I have to keep changing the href for.  Is this possible?  I
couldn't find any reference to customising the anchor hreferences in
the documentation.

Thanks again,
Zoe.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to