Hi,
I am using the great Cool DHTML Tooltip
http://www.dynamicdrive.com/dynamici...tmltooltip.htm
but I have a small problem.
I found out that a text like this:
The flat is equipped with refrigerator, electric stove (upon request), electric kettle, dishes etc.
We would be happy to meet your train and show you personally to the flat. We may also arrange for you a transport from the airport (extra paid about 15 euro).
breaks the code because of the new line (when I remove it, it works).
I am retrieving this text from database with php and there seem to be no way to actually remove that new line.
I tried
PHP Code:
$descriptionrest = addslashes(strip_tags(substr($description, $startmore, $maxlength)));
$descriptionrest = str_replace("\n", "", $descriptionrest); // this removes the line break which breaks the java tooltip
$descriptionrest =trim($descriptionrest);
A working example:
http://www.myapartments.eu/Apartment...e-Lux-508.html
and a non working one
http://www.myapartments.eu/Apartment...Rydla-337.html
I am using a function
PHP Code:
function dhtmltooltip($text, $width)
{
$dhtmltooltip = "onMouseover=\"ddrivetip('$text', '$width')\" ; onMouseout=\"hideddrivetip()\"";
return $dhtmltooltip;
}
I am calling the function here:
PHP Code:
if ( strlen($description) >= $desclength) { $descmore = "...(more) <img src=\"$server_root/images/arrowrightsm.gif\" border = 0 ".dhtmltooltip($descriptionrest, 300)." > ";}
else {$descmore = "";}
As I do not know Javascript, maybe there is an easy solution on the java side?
I am lost now 
Thank you for your help!
Bye
Luca
Bookmarks