Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: rollover link
Theo
Junior Member

Posts: 4
Registered: 9/17/2007
Location: Netherlands
Member Is Offline
posted on 9/17/2007 at 03:27 AM Reply With Quote
rollover link


i'm currenly adapting the event calendar to suit my needs. I want to make a rollover link, so when i point a day i get the event title in a little box. Works like the 'title' that is already in the program.

problem 1: i want to add the $body message also in the title box but it doesn't display

problem 2: when i point over a day that has 2 or more events the box doens't show anything.

my calendar: http://www.dorusrijkersgroep.nl/agenda2/

here's the piece of code from calendar.php, the javascript that the box uses i got from myevent calendar

Code:
function put_href($str, $link, $title, $params, $adds = '', $only_this = 0, $font = '') {
global $_GET, $_POST, $_SERVER;
list($_GL) = split('?', $_SERVER['REQUEST_URI']);
$link = $link ? $link : $_GL;
$_p = split("&", $params);
foreach($_p as $k => $v) {
list($ke, $va) = split("=", $v);
$PAR[$ke] = $va;
}
if(!$this->is_Admin)$p = array_merge($_POST, $_GET, $PAR);
else $p = array_merge($_GET, $PAR);
foreach($p as $k =>$v)$vars[] = "$k=$v";
$par[] = is_array($vars) ? join("&", $vars) : '';
$params = $only_this ? $params : join("&", $par);
$params=str_replace(" ",'',$params);
$titlevoor = ($title ? " title="$title"" : '');
$title = htmlspecialchars("Afspraken:<br /><b>".$title."</b> : <br />".$body);
$linkbeschrijving ="onmouseover="this.T_WIDTH=210;this.T_SHADOWWIDTH=2;this.T_BGCOLOR='#ffffff'; return escape('".$title."')" ";
ereg("name=([^&]+)",$params,$res);
$name=urlencode($res[1]);
$params=ereg_replace("name=([^&]+)","name=".$name,$params);
//return "<a href="$link".($params ? "?$params" : '').""".($title ? " title="$title"" : '')."$adds>".($font?"<span class="$font">":'').$str.($font?"</span>":"")."</a>";
return "<a href="$link".($params ? "?$params" : '').""".$linkbeschrijving."$adds>".($font?"<span class="$font">":'').$str.($font?"</span>":"")."</a>";
//return "<a href="$link".($params ? "?$params" : '').""".($linkbeschrijving ? " linkbeschrijving="$linkbeschrijving"" : '')."$adds>".($font?"<span class="$font">":'').$str.($font?"</span>":"")."</a>";
}


the first line with the // is the original and works with 2 events on the same day. The line below that is a working rollover but with the problems described above. The second line with // doesn't work.
thanks in advance
View User's Profile View All Posts By User U2U Member
kvv
Super Administrator

Posts: 86
Registered: 6/17/2003
Member Is Offline
posted on 9/17/2007 at 03:12 PM Reply With Quote

Please run your page in FireFox and you will see JS errors.
I think it caused a problem you have.
View User's Profile View All Posts By User U2U Member
Theo
Junior Member

Posts: 4
Registered: 9/17/2007
Location: Netherlands
Member Is Offline
posted on 9/17/2007 at 05:29 PM Reply With Quote

hey, i used firefox now and it didn't display any errors, neither does it display the info box
but the original code doesn't work in firefox either so i'm happy if it will work in IE

Well, now i found how i can display a month with the title of the event in the table i guess i don't need the function where i had problems with after all :). I'll just make a little opup window for the body of the event.

so i'll stick with:
Code:
return "<a href="$link".($params ? "?$params" : '').""".($title ? " title="$title"" : '')."$adds>".($font?"<span class="$font">":'').$str.($font?"</span>":"")."</a>";


q1: any idea how i can display the title of the event, (when hovering over with the mouse) immediatly instead after a second or 2?
q2: and how is the title of the event when hovering over formatted? i noticed a nice break between two ore more event is made, but i cant seem to make something like:
Events:
title event 1
title event 2 etc
edit: can make the example in q2, however without formatting. Still in the monthview the title displays with <br> tags

thanks
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Free/Trial Script Download Free Download
Product Documentation Documentation
Documentation page
Change Log
Support Forum Support Forum
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004