CalendarXP.net Support Forum Index CalendarXP.net Support
Most forums here are private and invisible to public.
 
 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Javascript error

 
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> FlatCalendarXP Related
View previous topic :: View next topic  
Author Message
tolciu



Joined: 06 Jun 2005
Posts: 2

PostPosted: Tue Jun 07, 2005 6:31 pm    Post subject: Javascript error Reply with quote

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
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Wed Jun 08, 2005 12:17 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> FlatCalendarXP Related All times are GMT
Page 1 of 1

 
Jump to:  
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