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? Quote Link to comment 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) Quote Link to comment 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! Quote Link to comment 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... Quote Link to comment 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. Quote Link to comment 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>"; Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.