|
CalendarXP.net Support Most forums here are private and invisible to public.
|
View previous topic :: View next topic |
Author |
Message |
tolciu
Joined: 06 Jun 2005 Posts: 2
|
Posted: Tue Jun 07, 2005 6:31 pm Post subject: Javascript error |
|
|
I am using with the flat calendar the normal.js and normal.css files. We have 2 versions of these files for french and english. When we translated "You cannot select today!" to french it causes a javascript error. When we took out the ' in aujourd'hui then the error did not happen. Is there a way around this so we can use this french translation? Here is the line of code in the normal_fr.js that causes the error:
var gsBottom="<A href='javascript:void(0)' class='BottomAnchor' onclick='if(this.blur)this.blur();if(!fSetDate(gToday[0],gToday[1],gToday[2]))alert(\"Vous ne pouvez pas choisir aujourd'hui!\");return false;' onmouseover='return true;' >Aujourd'hui "+gMonths[gToday[1]-1].substring(0,3)+" "+gToday[2]+", "+gToday[0]+"</A>"; // the content of the bottom section.
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Wed Jun 08, 2005 12:17 am Post subject: |
|
|
Yes, this is because the single-quote char messed up with the string boundary. In such case, you need to create a global variable to accommodate it - e.g.
Code: | var strAlertFrench="Vous ne pouvez pas choisir aujourd'hui!";
var gsBottom="<A href='javascript:void(0)' class='BottomAnchor' onclick='if(this.blur)this.blur();if(!fSetDate(gToday[0],gToday[1],gToday[2]))alert(strAlertFrench);return false;' onmouseover='return true;' >Aujourd'hui "+gMonths[gToday[1]-1].substring(0,3)+" "+gToday[2]+", "+gToday[0]+"</A>"; |
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
Copyright 2003- Idemfactor Solutions, Inc. All rights reserved.
Powered by phpBB © 2001, 2005 phpBB Group
|