ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / WEBDEV specific features / Mashup
  • 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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 line of code 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 version required
  • Version 14
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help