Re: [PHPTAL] Lower than as char in javascript

2008-05-31 Thread Krzysztof Sikorski
 And it's also a good idea to put JS code in an external file like that :
 script type=text/javascript src=code.js/script

 This is not possible, as we have to generate the js code per page request.

You can also try  script type=text/javascript
src=code.php/scriptand use a php file to generate js file,
instead of abovementioned methods.
___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


Re: [PHPTAL] Lower than as char in javascript

2008-05-30 Thread Guillaume Lecanu
Le jeudi 29 mai 2008 à 22:55 +0200, Christian Welzel a écrit :

 Hi there,
 
 is there a way to insert a lower than in phptal, which is printed as lower 
 than in the source code?
 My problem: i have a javascript part in my template where i need a lower
 than in some cases ... ( if(foo  0) { do(); } )
 I could not find a simple way to add this  to the code.
 The only way i found is this:
 if( foo span tal:replace=structure lessthen / 0) { do(); }
 and define lessthan = '' in my phpcode.

Hi,


Is your JavaScript is between a CDATA block ?
script type=text/javascript
// ![CDATA[


(your JavaScript here)

// ]]
/script


And it's also a good idea to put JS code in an external file like that :
script type=text/javascript src=code.js/script


___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal