ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Web-specific functions / Page functions
  • Additional controls
  • Outgoing format and page optimization
  • Please note: only one action can be performed at a time on the same page.
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Emails the data found in a page currently displayed in the browser.
Remark: This function uses the surfer's current address. The browser will ask for one or more confirmations.
Example
// Envoie le contenu des champs à une adresse email
PageToEmail("", "someone@somewhere.earth")
// Utilise directement le nom des champs du formulaire pour l'envoi d'emails
// SAI_Destinataire, SAI_Sujet, SAI_Demande sont des champs de saisie
PageToEmail(PAGE_Formulaire, SAI_Destinataire, SAI_Sujet, SAI_Demande, pteAttachment)
Syntax
PageToEmail(<Page> , <Destination email address> [, <Message subject> [, <Message body> [, <Encoding>]]])
<Page>: Page name
Name of the page whose data must be emailed. If this parameter corresponds an empty string (""), the current page will be taken into account. This page must be currently displayed in the browser.
<Destination email address>: Character string
Email address to which the data found in the WEBDEV page will be sent.
<Message subject>: Optional character string
Subject of email.
<Message body>: Optional character string
Body of the email.
<Encoding>: Optional character string constant
Type of encoding to use:
pteAttachmentThe values of controls are written in an attachment.
pteBody
(default value)
The values of the controls are written in the body of the message.
In this case, <Message Body> is ignored.
Remarks

Additional controls

The page can contain additional controls specific to WEBDEV (WD_ACTION, WD_BUTTON_CLICK, ...). These controls are required by WEBDEV in order to operate properly. The value of these controls is also returned to the ASP server.

Outgoing format and page optimization

Values are returned in pairs of the following form: (<Alias du champ>, <Valeur du champ>).
We recommend that you use "Compress the names of controls (..Alias)".
Reminder This option is available in the advanced optimization features of HTML code:
  • Project configuration: "Project" tab in the project description.
  • Page configuration: "Advanced" tab in page description.

Please note: only one action can be performed at a time on the same page.

PageToEmail triggers an action on the page displayed in the browser of Web user. However, Internet browsers allow one single action on the page per process.
Consequences The function PageToEmail function cannot be used in a code that (automatically or not) triggers an action. This function is ignored:
  • In the click code of a "submit" button (or in a procedure called by the click code of this button)
  • In the click code of an "other" button whose action differs from "none" (or in a procedure called by the click code of this button)
  • If it is followed by PageSubmit or by EmailOpenMail (in the current process, in a procedure called by the current process or in another process called by Execute).
Component: WDJS.DLL
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help