I have added a very simple function to pfcclient.js right after end of showClass function
- Code: Select all
test: function()
{
alert('hi');
},
And I added this piece of code to chat.html.tpl.php
- Code: Select all
<div class="pfc_btn">
<img src="<?php echo $c->getFileUrlFromTheme('images/online-on.gif'); ?>"
alt="" title=""
id="pfc_test"
onclick="pfc.test()" />
</div>
The button shows up just fine, but when I click on it, I get a javascript error: "pfc.test is not a function". If I set it to one of the existing functions, it works fine. Any idea why I can't seem to successfully add a function to pfcclient.js??
