Page 1 of 1

calendar onmouseover

Posted: Tue Oct 07, 2008 11:06 am
by danel
is it possible to use in calendar module onmouseover function ?

for example, if you move cursor on the date, it displays event without clicking. calendar is @ www.noored.hiiumaa.ee

Re: calendar onmouseover

Posted: Tue Jan 06, 2009 10:42 am
by rhysdavies
I wanted to do this, and at first it looked a simple case of adding an alt tag to the link in the template code as follows:

Code: Select all

{if isset($day.events.0)}<a [color=yellow]title="{$event.event_title}" [/color] href="{$day.url}">{$key}</a>
The bit I have added is in yellow, and basically I thought that this would display the event title when hovering over a date.  Unfortunately I cannot get it work, however, I am on the right lines, as I tried just a bit of plain text as a title:

Code: Select all

{if isset($day.events.0)}<a [color=yellow]title="PUT EVENT TITLE HERE!!" [/color] href="{$day.url}">{$key}</a>
This works without any trouble, but I am now stuck as to what the next step.  I will keep beavering away at it!

Re: [SOLVED] calendar onmouseover [SOLVED]

Posted: Tue Jan 06, 2009 11:04 am
by rhysdavies
I found what the problem was - I deleted a lot of things from the template, in particular this bit of code

Code: Select all

{foreach from=$day.events item=event}
{/foreach}
So obviously, it was not going to find the event title.

So revised code goes like this:

Code: Select all

{if isset($day.events.0)}<a title="{foreach from=$day.events item=event}{$event.event_title}{/foreach}" href="{$day.url}">{$key}</a>
Hope this helps!