calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Tue Feb 15, 2005 7:04 pm Post subject: [PopCalendarXP]I got a "gfPop is undefined" error, what's wrong? |
|
|
It means that the calendar engine has not yet been loaded when you try to popup the calendar.
Please check your calendar tag first and make sure the src property is pointing to the engine file with correct web path. Then you need to make sure there is no error generated during the engine loading process - for example, you might have a typo when modifying the theme or plugin, which will introduce a syntax error and fail the whole engine. The easiest way to check is to load your page into a Mozilla browser, then check its JavaScript Console to see if there were any errors being reported.
There is another possibility that you may see this error - if your page took a long time to load and the user tried to trigger the popup before the page is fully loaded. To avoid such error you need to prepend the "if(self.gfPop)" condition check to the onclick event handler, as we did in every demo. e.g.
Code: | <a onclick="if(self.gfPop)gfPop.fPopCalendar(...);else alert('Please wait until the page is fully loaded.'); return false;" ...>...</a> |
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|