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 

How can I call the functions defined inside the calendar engine from my web page?

 
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> CalendarXP F.A.Q.
View previous topic :: View next topic  
Author Message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Tue Feb 15, 2005 6:56 pm    Post subject: How can I call the functions defined inside the calendar engine from my web page? Reply with quote

You can reference anything inside the calendar engine by prefixing it with the engine's context name, which is defined by the 4th param of the name & id of the iframe tag . e.g. if we have the following iframe calendar tag:
Code:
<iframe width=174 height=189 name="gToday:normal:agenda.js:gfFlat" id="gToday:normal:agenda.js:gfFlat" src="HelloWorld/iflateng.htm" scrolling="no" frameborder="0">
</iframe>

Now we can call any function inside the engine from the container page. e.g.
Code:
<script>gfFlat.fGetWeekNo(y,m,d);</script>


NOTE: the ContextName (e.g. gfPop or gfFlat) is only available after the engine has been fully loaded. If you try to access it too earlier an "object not found" error may be raised. Therefore, the safe way is to prefix it with "if(self.ContextName)" to avoid potential error. e.g.

Code:
<script>if (self.gfFlat) gfFlat.fGetWeekNo(y,m,d);</script>

_________________
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 -> CalendarXP F.A.Q. 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