21301 Posts in 5735 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 159 Views |
-
Storing custom code, E.G - javascript

24 January 2012 at 5:24am
A client of mine uses javascript banners, and would like to be able to add them manually in the CMS, however SilverStripe always strips out all the " & 's. So it never works. have tried lots all the different data types, but it always escapes the special characters.
is there any way at all to do this?
If the codes followed a similar pattern I would create a template and let the client just add in the URL that changes etc, but the code is always different depending on the banner supplier. here's an example:<script language="JavaScript" type="text/javascript" src="***"></script> </head> <body> <div><span id="text1"> </span><br/></div> <div><span id="text2"> </span><br/></div> <script language="JavaScript">
var ticker = new Ticker({info: 1, local: 1, casino: 'europa', game: 'car',currency: 'eur'}); ticker.attachToTextBox('text1'); ticker.tick();
var ticker2 = new Ticker({info: 4, local: 1, casino: 'titan', currency: 'eur'}); ticker2.attachToTextBox('text2'); ticker2.tick();</script>
as usual, any help is greatly appreciated!
| 159 Views | ||
|
Page:
1
|
Go to Top |

