Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 06-22-2015 09:48:43

nigel
Member
From: Peterborough, UK
Registered: 04-27-2008
Posts: 418
Website

php help please

Hi,

I am trying to include the following code in a product detail display but it just stops the page displaying so there is obviously a syntax error somewhere, any suggestions how I should write the code? It works fine in the skin.php but not in the product detail display.

Code:

print'<a class="tooltip" href="tooltip/info/sv45.html#div2" onmouseover="tooltip.ajax(this, 'tooltip/info/sv45.html#div2');" onclick="return false;">text or image here</a>' . $eol;

Last edited by nigel (06-22-2015 10:06:58)

Offline

 

#2 06-22-2015 10:41:02

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Re: php help please

Code:

print '<a class="tooltip" href="tooltip/info/sv45.html#div2" onmouseover="tooltip.ajax(this, \'tooltip/info/sv45.html#div2\');" onclick="return false;">text or image here</a>' . $eol;

Rob

Offline

 

#3 06-22-2015 10:43:52

Iceit88
Member
From: Fairview, PA
Registered: 11-19-2003
Posts: 549
Website

Re: php help please

Not sure where you are placing it, but make sure it is enclosed in PHP tags.

Code:

<?php
print'<a class="tooltip" href="tooltip/info/sv45.html#div2" onmouseover="tooltip.ajax(this, 'tooltip/info/sv45.html#div2');" onclick="return false;">text or image here</a>' . $eol;
?>

Bryan

Hat Trick Sports, LLC

Offline

 

#4 06-22-2015 11:04:23

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: php help please

The single quotes in there are going to need to be escaped.  ' needs to become \'.


Nick Hendler

Offline

 

#5 06-23-2015 02:30:58

nigel
Member
From: Peterborough, UK
Registered: 04-27-2008
Posts: 418
Website

Re: php help please

thanks everyone for your help, it was the single quotes that were causing the issue.

Offline

 

Board footer