Java script in banners Posted by Todd 10 Dec 2007 20:10 UTC Assuming it's possible, how can I run a java script in a banner? Seems like everything betwees a and a gets deleted.
Posted by Rick Sapir / Tiki for Smarties 10 Dec 2007 21:08 UTC > Assuming it's possible, how can I run a java script in a banner? Seems like everything betwees a and a gets deleted. You can add javascript code by using the smarty LITERAL tag: Copy to clipboard{literal}javascript{/literal} HTH, -Rick Now Available: TikiWiki for Dummies Smarties — A beginner's guide to using ))TikiWiki((.
Posted by Todd 10 Dec 2007 21:52 UTC Still does the same thing. I'm probably doing something else wrong. Here's what I have in the "Use HTML" section of "Edit Banners" {literal] var AdBrite_Title_Color = '0000FF'; var AdBrite_Text_Color = '000000'; var AdBrite_Background_Color = 'FFFFFF'; var AdBrite_Border_Color = 'FFFFFF'; {/literal} Your Ad Here The only things that gets displayed are the 4 Var lines and the "Your ad here" link > > Assuming it's possible, how can I run a java script in a banner? Seems like everything betwees a and a gets deleted. > > You can add javascript code by using the smarty LITERAL tag: > > Copy to clipboard> {literal}javascript{/literal} > > > HTH, > > -Rick > Now Available: TikiWiki for Dummies Smarties — A beginner's guide to using ))TikiWiki((.
Posted by Gary Cunningham-Lee 11 Dec 2007 01:48 UTC As far as I know, Javascript is stripped out of all web-submitted content in Tiki (except via the wikiplugin), including banner html code. JS works in templates, wrapped in literal tags for Smarty compatibility, because these are FTPed to the server and so don't pose the same security risk. If I'm mistaken and banners can in fact use input Javascript, then I need to update my info on this. Given that, the banner Javascript has to be external. For banners, you could make an HTML banner that lays out an iframe that loads an external html file that is your ad script. Or there is a "Fixed URL" type when creating a banner; maybe this could point to the script html file, but I haven't tried it. -- Gary