Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Problem with loading / executing javascript
Ok so I made a thingy that displays the babel fish translate box on the discussions thingy....it works, but I wanted to add a hide/show thingy to it in case it gets in the ppls way so here's what I have..
if(in_array($Context->SelfUrl, array("categories.php", "post.php"))){
$BabelFish = <<< ENDCODE
<table id="foo" class="Translate" width="150" border="0">
<tbody>
<tr>
<td><a href="#null" onclick="toggleRow('foo1')">Show/Hide</a></td>
</tr>
<tr id="foo1">
<td><script type="text/javascript" src="http://www.altavista.com/static/scripts/translate_engl.js"></script></td>
</tr>
</tbody>
</table>
ENDCODE;
$Panel->AddString($BabelFish,false);
$Head->AddScript('extensions/BabelFish/hide.js');
$Head->AddStyleSheet('extensions/BabelFish/style.css');
}
I know it works because the same thing works with html and it hides and shows quite happily, only inside Vanilla it doesn't seem to, I am confused, and like a dog with a bone, won't let go....so if you could please tell me I've made some sort of stupid error that'll make me feel a lot better thanks......
0
This discussion has been closed.