Jump to content

Problem with script inside echo


Peter Knight
 Share

Recommended Posts

Hi guys

I have a simple echo statement as follows

echo "
<h3 class='uk-accordion-title'>
$item->title
</h3>
"

I want to add a script provided by ZOHO which tracks clicks on certain web page objects.

<a onclick='$zoho.salesiq.visitor.customaction("Track-signup-button")'> SignUp </a>

This would be the resulting code when I add that

echo "
<a href='#' onclick='$zoho.salesiq.visitor.customaction('$item->title')'> . </a>
<h3 class='uk-accordion-title'>
$item->title
</h3>
"

When the HML is output, it almost works BUT the variable $zoho gets removed every time.

<a href='#' onclick='.salesiq.visitor.customaction('Our Location')'> . </a>
<h3 class='uk-accordion-title'>
Our Location
</h3>

 

Is this a bug with my method or some escaping issue?

Thanks

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...