PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Example: Retrieving a task list from a Google calendar
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Handling external Javascript objects from WLanguage
Overview
The WLanguage in "Browser" mode is used to interface with the Web APIs such as the ones proposed by Google or Yahoo. The interaction with the external components proposed by these sites is simplified.
You have the ability to allocate external Javascript objects in browser code written in WLanguage.
The use of external Javascript objects does not necessarily require the use of the Javascript language: the programming can be done in WLanguage
Example: Retrieving a task list from a Google calendar
To retrieve a task list from a Google calendar:
  1. Include the programming interface of Google calendar in the page.
    • Display the "Advanced" tab of the page description.
    • In the "HTML" tab, add the following code line into the HTML code of the page header:
      <script type="text/javascript">google.load("gdata", "1");</script>
      This code is supplied in the Google documentation.
    • In the "Javascript" tab, click the "Add a Web resource" button. Enter the address used to include the calendar service:
      http://www.google.com/jsapi?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      (the code of the key corresponds to your personal code).
  2. Enter the browser code used to retrieve the task list:
    MyCalendarService is dynamic object
    MyCalendarService = new object "google.gdata.calendar.CalendarService"
    MyTasks is dynamic array
    MyTasks = MyCalendarService:feed:entry
    // Browse the array to fill the list
    FOR i = 1 TO Dimension(MyTasks)
    ListAdd(LIST_Task_Choice, MyTasks[i]:getTitle():getText())
    END
Minimum required version
  • Version 14
Comments
Click [Add] to post a comment