SieRobin Posted October 2, 2006 Share Posted October 2, 2006 Ok I made DHTML Tooltips, the crappy part is, getting it to work within a PHP print.If I use print, what's weird that happens is it re-writes out the variable after the link.[code]print "<tr class='mainrow'><td><a href='forum.php?brd=$brd&msg=$thread3[ID]' class='tip' onmouseover=tooltip('$thread3['post']'); onmouseout=exit();>$thread3[title]</a></td>[/code][IMG]http://img.photobucket.com/albums/v679/christopherobin/forum.jpg[/img]If you can see, it's quite odd, how exactly can I fix this so it doesn't output like that? Link to comment https://forums.phpfreaks.com/topic/22781-help/ Share on other sites More sharing options...
michaellunsford Posted October 2, 2006 Share Posted October 2, 2006 probably need to escape those quotes inside your onmouseoverprint "<tr class='mainrow'><td><a href='forum.php?brd=$brd&msg=$thread3[ID]' class='tip' onmouseover=tooltip('$thread3[\'post\']'); onmouseout=exit();>$thread3[title]</a></td>PS> you might have to double-escape them (but I don't think so) Link to comment https://forums.phpfreaks.com/topic/22781-help/#findComment-102599 Share on other sites More sharing options...
printf Posted October 2, 2006 Share Posted October 2, 2006 Your print is not closed at the end '";'. also I would recommend you dot " . $var . ", or enclose {$var} your variables, also use quotes on array elements $var['element'] or $var ["element"]. I guess what I am saying, is be consistent in your coding habits!me! Link to comment https://forums.phpfreaks.com/topic/22781-help/#findComment-102602 Share on other sites More sharing options...
alpine Posted October 2, 2006 Share Posted October 2, 2006 And please - use a more suitable Topic title next time - "Help" is what everybody is here for, such titles should be filtered... Link to comment https://forums.phpfreaks.com/topic/22781-help/#findComment-102607 Share on other sites More sharing options...
michaellunsford Posted October 2, 2006 Share Posted October 2, 2006 yeah, the quotes are just plain messed up. Recheck your code. Link to comment https://forums.phpfreaks.com/topic/22781-help/#findComment-102609 Share on other sites More sharing options...
Hi I Am Timbo Posted October 2, 2006 Share Posted October 2, 2006 print "<tr class='mainrow'><td><a href='forum.php?brd=$brd&msg=".$thread3['ID']."' class='tip' onmouseover=tooltip('".$thread3['post']."'); onmouseout=exit();>".$thread3['title']."</a></td>"; Link to comment https://forums.phpfreaks.com/topic/22781-help/#findComment-102612 Share on other sites More sharing options...
SieRobin Posted October 3, 2006 Author Share Posted October 3, 2006 [quote author=alpine link=topic=110275.msg445523#msg445523 date=1159816623]And please - use a more suitable Topic title next time - "Help" is what everybody is here for, such titles should be filtered...[/quote]If I would have put, "DHTML Tooltips" you still would have flamed me and told someone to bump it to a different category, lol. Link to comment https://forums.phpfreaks.com/topic/22781-help/#findComment-102816 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.