ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Button control
  • Overview
  • Available actions
  • Preset actions
  • Specific actions
  • Special case: share on a social network
  • Action destination
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
Choosing the action associated with a WEBDEV button
Overview
Whatever the type of button, it is possible to associate an action with it. The most common actions are available in the "General" tab of the control description window.
Action associated with the Button control
For more specific actions, click "More options".
In any case, you need to specify the destination of the action.
Available actions

Preset actions

Different preset actions are available in a drop-down list. These preset actions depend on the elements in the page or project.
For example, you can choose to:
  • execute the click code of a Button control (browser code or server and browser code),
  • display a page of the site,
  • display a page from another site,
  • perform a custom action (send an email, call a phone number, connect to an FTP server, download a file, etc.). In this case, you can specify different parameters.
Caution: the actions are performed after the click code of the button (browser code and server code).

Specific actions

The "More options" link shows additional options. You can for example:
  • do an action on another control,
  • set the position on one of the page anchors,
  • share on a social network,
  • change the current language,
  • send the value of the page controls to ... a page or script. For example, this option can be used to process the content of a form in a static site.
Remark: All these operations can also be performed programmatically.

Special case: share on a social network

The "Share on a social network" action allows you to create a Button, Link or Image control (with clickable areas) to share the current page, domain or specific URL on a social network. This action can also be performed via the Social Network control.
Remark: Using a Button, Link or Image control (with clickable areas) allows you to fully configure the style used (however, it is recommended to comply with the license agreements of the different social networks). The Social Network control has advanced settings (e.g., display the number of shares, etc.).
The table below presents the information used for each social network:
Social NetworkShared elementEffect
FacebookDomainCreates a Facebook post with a link to the domain of the current website.
Caution: A default index page must exist on the hosting server.
PageCreates a Facebook post with a link to the page of the current website.
Custom targetThe URL must be typed in the "Target URL" field.
Case 1: URL of a Facebook page:
Increments the counter of the liked Facebook page.
Case 2: URL of any page or site:
Creates a Facebook post with a link to the specified page or website.
TwitterDomainCreates a Tweet with a link to the domain of the current website.
PageCreates a Tweet with a link to the page of the current website.
Custom targetThe URL must be typed in the "Target URL" field.
Creates a Tweet with a link to specified URL.
LinkedInDomainCreates a LinkedIn post with a link to the domain.
Caution: A default index page must exist on the hosting server.
PageCreates a LinkedIn post with a link to the web page.
Custom targetCreates a LinkedIn post with a custom link.
The URL of the link to be sent must be entered in the "Target URL" field.
TumblrDomainCreates a Tumblr post with a link to the domain of the current website.
PageCreates a Tumblr post with a link to the page of the current website.
Custom targetThe URL must be typed in the "Target URL" field.
Creates a Tumblr post with a link to specified URL.
WhatsAppPageCreates a WhatsApp message with a link to the page of the current website.
Custom targetThe URL must be typed in the "Target URL" field.
Creates a WhatsApp message with a link to the specified URL.

The "Destination" field is used to select the display mode of the connection and input window on the social network.
Action destination
If no destination is chosen for the action, it is performed in the default destination defined for the current page.
The possible destinations of an action performed via a Button control are as follows:
At the same location (_self):
Displays the result in the same browser.
Current frame
New browser tab (_blank):
Displays the result in a new browser window.
New browser
Named browser tab:
Displays the result in an existing browser window.
New browser
Parent frame (_parent):
Displays the result in the parent frame (case of nested framesets).
Parent frame
Current browser (_top):
Displays the result in the current page of the browser (without frames).
Current browser
Other frames of the frameset (if the page belongs to a frameset):
Displays the result in a specific frame.
iFrame control of the page (if the page contains at least one iFrame control):
Displays the result in an iFrame control.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 09/08/2023

Send a report | Local help