Jump to content


Photo

Help!


  • Please log in to reply
6 replies to this topic

#1 SieRobin

SieRobin
  • Members
  • PipPipPip
  • Advanced Member
  • 212 posts
  • LocationNew Jersey

Posted 02 October 2006 - 06:41 PM

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.

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>

Posted Image

If you can see, it's quite odd, how exactly can I fix this so it doesn't output like that?

#2 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 02 October 2006 - 07:09 PM

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)

#3 printf

printf
  • Staff Alumni
  • Advanced Member
  • 889 posts

Posted 02 October 2006 - 07:12 PM

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!

#4 alpine

alpine
  • Members
  • PipPipPip
  • Advanced Member
  • 756 posts
  • LocationNorway

Posted 02 October 2006 - 07:17 PM

And please - use a more suitable Topic title next time - "Help" is what everybody is here for, such titles should be filtered...

#5 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 02 October 2006 - 07:20 PM

yeah, the quotes are just plain messed up. Recheck your code.

#6 Hi I Am Timbo

Hi I Am Timbo
  • Members
  • PipPipPip
  • Advanced Member
  • 109 posts

Posted 02 October 2006 - 07:23 PM

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>";

#7 SieRobin

SieRobin
  • Members
  • PipPipPip
  • Advanced Member
  • 212 posts
  • LocationNew Jersey

Posted 03 October 2006 - 03:35 AM

And please - use a more suitable Topic title next time - "Help" is what everybody is here for, such titles should be filtered...


If I would have put, "DHTML Tooltips" you still would have flamed me and told someone to bump it to a different category, lol.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users