By: Cristian R.
Date: 2003-10-03
Time: 23:51
|
Generated JavaScript problem with TBS
Hi, there, hope you can help me with this. I've bumped into a show stopper using TBS here.
I'm using a PHP library that outputs some JavaScript code to a PHP variable, for generating a nice drop-down menu.
Some of the JS generated code is
<code>
var MENU_ITEMS1 =
[
{"pos":"relative", "size":[height1 ,width1], "itemoff":[0,width1-1], "leveloff":[height1-1,0], "delay":600, "style":STYLE1}
, {code:"File", url:"file.php"}
... (more)...
</code>
The PHP variable containing the code is $somevar, but when I try to output it using [var.somevar;htmlconv=no], what TBS outputs is:
<code>
var BLANK_IMAGE = "tpl/menu/pics/bPixel.gif";
var MENU_ITEMS1 =
<b>[</b>
{"pos":"relative", "size":[height1 ,width1], "itemoff":[0,width1-1], "leveloff":[height1-1,0], "delay":600, "style":STYLE1}
, {code:"File", url:"file.php"}
... (more)...
</code>
Note the <b>[</b> replaced with <b>[</b>, which renders the generated JS code completely useless!
¿How can I solve this? Please, help.
|
By: Skrol29
Date: 2003-10-04
Time: 00:06
|
Re: Generated JavaScript problem with TBS
Hi Cristian,
You have to use:
[var.somevar;htmlconv=no;protect=no]
The character '[' is automatically replaced by TBS because of security reasons. It is a bit hard to explan why but without that behavior, is would be a kind of security fault.
|
By: Cristian R.
Date: 2003-10-04
Time: 00:27
|
Re: Generated JavaScript problem with TBS
(wow! I posted the original message just some 30 minutes ago, or less...)
Thank you a lot, Skrol29! It works like a charm now!
Greetz from Argentina, Tango and Dulce de Leche.
|