Advanced Tooltips Support Product Page
This topic is locked
Answered
Rich Text from mySQL record
Asked 11 Jun 2011 20:41:29
1
has this question
11 Jun 2011 20:41:29 Khalil Radhi posted:
I have a .php page with datagrid that includes a thumbnail of a product on each row.Trying to save space, I intend to use tooltip to display the product description from the database whenever the mouse hovers over the product thumbnail.
This has worked fine with every field from the products table apart from the description field which is a TEXT type and holds html formatted text.
When I select the description field as the source of the tooltip content, the tooltip doesn't work anymore but I get the description field contents populated next to the thumbnail in the grid cell and showing the rest of the tooltip behavior code inline.
This is an example of the description field contents copied directly from the mySQL table:
[h3] [img]/ckfinder/userfiles/images/9096-card-1.jpg" style="margin-right: 10px; float: left; width: 100px; height: 100px;" />Product title here[/h3] <p> With rate type selected III</p>
and this is the code block from my php page:
[img]/_thumbs/Images/<?php echo($row_travel_destination['destination_clipurl']); ?>" alt="" onMouseOver="applyDMXTooltip(this,'text','<?php echo $row_travel_destination['destination_description']; ?>','fly','easeOutQuad','top','out',600,600,'clickout','darkgreybevel',true,'','',0,0,'auto','auto','auto','auto')">
I am sure the answer is simple, but I am no where near it.
Replies
Replied 13 Jun 2011 09:59:14
13 Jun 2011 09:59:14 Miroslav Zografski replied:
Hello Khalil,
you need to escape the quotes in the php echo for the description. There are some php functions that can add escaping slashes inform of the quotes.
Check for those at php.net
Regards,
you need to escape the quotes in the php echo for the description. There are some php functions that can add escaping slashes inform of the quotes.
Check for those at php.net
Regards,
Replied 13 Jun 2011 20:14:08
13 Jun 2011 20:14:08 Khalil Radhi replied:
Thanks Miroslav, your prompt reply is highly appreciated.
I was expecting a real product support to get me on the right track though. If I was into coding and researching about escape quotes and str_replace stuff then I would have saved the money and went for the JQuery tools from flowplayer.org.
Edited by - Khalil Radhi on 13 Jun 2011 20:15:47