![]() |
Problem adding javascript to template
Hello
Might be a bug (but couldnt find the bug reporting stuff on vbulletin.com) But probably its just stupid me.. that cant write javascript... I want to edit a template (any template) and add a simple javascript: HTML Code:
<script type="text/javascript"> Quote:
if i add javascript other than var x = ''; or something.. it works... I could write var test="test"; outside of the function... that works... but no point in having a function then... i found the parse error in adminfunctions_template.php on line 4516 it does eval($template) so i added ... print $template;exit; and on that line it does: function checkme() ' . htmlspecialchars($test=test;) . ' which gives the parse error... Now my question. Is there a simple way to add my function? thanks for any help Felix [EDIT] Found a workaround, not very elegant.. but works for me... maybe it helps someone else.. HTML Code:
<script type="text/javascript"> but: HTML Code:
<script type="text/javascript"> works... seems that the parse error is triggered by the var inside a function... strange.. |
It is a known bug in the template parser.
|
thanx
for your reply Felix |
surround the javascript with
Quote:
|
thx
works! |
All times are GMT. The time now is 12:00 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|