Jump to content

Archived

This topic is now archived and is closed to further replies.

SieRobin

Help!

Recommended Posts

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?

Share this post


Link to post
Share on other sites
probably need to escape those quotes inside your onmouseover

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>

PS> you  might have to double-escape them (but I don't think so)

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
And please - use a more suitable Topic title next time - "Help" is what everybody is here for, such titles should be filtered...

Share this post


Link to post
Share on other sites
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>";

Share this post


Link to post
Share on other sites
[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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.