Hi,

The AuthSubJS for the JavaScript client library is different than normal
AuthSub that it doesn't need a "next" parameter.  The URL where the
AuthSubJS is initiated, will be the place the redirection occurs after a
successful authentication.

As for the image, this is required for crossdomain communication, you just
have to have an image tag wtih an image from the same host where your
JavaScript/HTML files resides.  This image doesn't need to be visible, you
can position it far off the page.

These information and more details regarding the JavaScript client library
can be found here -

http://code.google.com/apis/calendar/developers_guide_js.html

Hope that helps,
Austin

On Tue, Jun 10, 2008 at 5:00 AM, sarath <[EMAIL PROTECTED]> wrote:

>
> Hi,
> I am Sarath I am working on Google Calendar and i am new to it.I am
> creating a Time sheet  with the Google calendar.Can any one tell me
> where should i give the next URL(in javascript) with an example . and
> it also gives me an error message " An image of the same domain is
> required on this page for authenticated reads and all writes " What
> image should i embed to my javascript code.I have the code below just
> tell me were to call the next URL.....
>
>
> <html>
> <head>
> <title> GoogleCalendar</title>
> <script language= "javascript"
> src="http://www.google.com/jsapi?
> key=ABQIAAAAEljKHOfalXkWUVjOxD4SjBSn3fC-pnPUXfnd8ZAuNhx5fXHWHBSLbusM-
> V80d4a7Ucbkjk-2dWMO7A<http://www.google.com/jsapi?key=ABQIAAAAEljKHOfalXkWUVjOxD4SjBSn3fC-pnPUXfnd8ZAuNhx5fXHWHBSLbusM-V80d4a7Ucbkjk-2dWMO7A>
> ">
> </script>
> <script >
> google.load("gdata","1");
> google.setOnLoadCallback(getMyFeed);
> var myService ;
> var feedUrl = "http://www.google.com/calendar/feeds/default/private/
> full";
> var AUTH_SUB_REQUEST_URL = "http://www.google.com/accounts/
> AuthSubRequest";
>
>
> function getMyFeed(){
>        setupMyService();
>        myService.getEventsFeed(feedUrl,handleMyFeed,handleError);
> }
>
> function handleMyFeed(myResultsFeedRoot){
>        alert("This feed's title is :" +
> myResultsFeedRoot.feed.getTitle().getText());
> }
>
> function handleError(e){
>        alert("there was an Error");
>        alert(e.cause ? e.cause.statusText : e.message);
> }
>
> function logMeIn() {
>  scope = "http://www.google.com/calendar/feeds/";;
>  var token = google.accounts.user.login(scope);
>  // PRINT (token);
>  alert(token);
>  var next = "http://www.coolcalendarsite.com";;
>  //var next = "www.yahoo.com";
>   "https://www.google.com/accounts/AuthSubRequest?next=https%3A%2F
> %2Fwww.salesforce.com%2Fapex%2Fgsession&scope=https://www.google.com/
> calendar/feeds/&session=1&secure=0&hd=default<https://www.google.com/calendar/feeds/&session=1&secure=0&hd=default>
> ";
> }
>
> function setupMyService() {
>  myService= new google.gdata.calendar.CalendarService('exampleCo-
> exampleApp-1');
>  logMeIn();
> }
>
> function logMeOut() {
>  google.accounts.user.logout();
> }
>
>
> </script>
> <body>
> <img src="https://www.google.com/a/cpanel/opussoft.com/images/logo.gif?
> service=cl<https://www.google.com/a/cpanel/opussoft.com/images/logo.gif?service=cl>"
> style="position:absolute; top: -1000px;">
> </body>
> </head>
> </html>
>
>
>
>
>
> Please help me...
>
> Thanks in advance
>
> Sarath
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to