Forums / Developer / Resolution check / Comment47589
Bruce Morrison
Thursday 18 January 2007 5:38:59 pm
Hi Pål
The reason you code is not producing the desired result is that the javascript is generating eZ template code.
The basic order of the process is:
1. User results URL 2. eZ does it's magic and generates html from combining the content and 3. templates. 4. HTML is read by browser5. Any javascript is run in the browser
Your code will just write the text template code into the HTML in the users browser. It's not happening in the right place in the process.
Some suggestions:+ Display the flash for all users but use javascript to hide (via CSS) or remove the flash from the HTML if the screen width < 800
+ If the screen width > 800 use AJAX to retrieve the code for the banner and add it in the HTML using javascript.
CheersBruce
My Blog: http://www.stuffandcontent.com/ Follow me on twitter: http://twitter.com/brucemorrison Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish