[TYPO3] JavaScript parse error

Tyler Kraft headhunterxiii at yahoo.ca
Mon Dec 18 11:45:25 CET 2006


Is it possibly htmltidy doing cleaning? Do you have 
config.xhtml_cleaning set?





Livius Agrippa wrote:
> Hi,
> 
> I try to insert a JavaScript code inside my template because I want that
> on the first page every 5 secs another image to be shown and also
> depending on the screen resolution.
> 
> My code works fine in a static page but when I insert this code in Typo3
> template the source output of my page is strange.
> 
> This JavaScript code:
> if ((screen.width >=1152) && (screen.width <1280)){
> image_list[image_index++] = new
> imageItem("startseite/1152/ibtweb_startbild_1.gif");
> image_list[image_index++] = new
> imageItem("startseite/1152/ibtweb_startbild_2.jpg");
> }
> if ((screen.width >=1280) && (screen.width <1600)) {
> image_list[image_index++] = new
> imageItem("fileadmin/template/startseite/1280/ibtweb_startbild_1.gif");
> image_list[image_index++] = new
> imageItem("fileadmin/template/startseite/1280/ibtweb_startbild_2.jpg");
> }
> 
> is parsed in this way:
> if ((screen.width >=1152) && (screen.width <1280)){
> image_listimage_index="new"
> imageitemstartseite1152ibtweb_startbild_1gif=""
> imageitemstartseite1152ibtweb_startbild_2jpg="" if=""
> screenwidth="">=1280) && (screen.width <1600))
> image_listimage_index="new"
> imageitemfileadmintemplatestartseite1280ibtweb_startbild_1gif=""
> imageitemfileadmintemplatestartseite1280ibtweb_startbild_2jpg=""
> 
> I don't have any idea and I hope that someone knows a solution for this.
> 
> Thank you in advance,
> Livius


More information about the TYPO3-english mailing list