ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Web-specific functions / Page functions
  • Caution: a single action can be performed at a time on the same page
  • Using PageSubmit from a Button control
  • The name of the Button control corresponds to a variable or a built string.
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
PageSubmit (Function)
In french: PageValide
Validates the specified page and starts the execution of a button. Only the server code of the button is run.
Example
// -- Browser click code of BTN_Close button
// Validates the page and starts running the server click code of BTN_Button1
PageSubmit("", "BTN_Button1")
// -- Browser click code on an image
// Run the click event of a SUBMIT button
// in order for the content of page controls to be sent to the server
 
// The BTN_FAMILY_CHOICE button opens a page in a new simplified browser
PageSubmit("", "BTN_FAMILY_CHOICE", NewBrowser, "Family Choice", ONSimple)
Syntax
PageSubmit(<Page> , <Button> [, <Target> [, <Browser window> [, <Options> [, <Width> [, <Height> [, <Horizontal position> [, <Vertical position> [, <JavaScript parameters>]]]]]]]])
<Page>: Page name
  • Name of page to validate,
  • Empty string ("") to validate the current page.
The page to validate must be one of the pages currently displayed in the browser.
<Button>: Control name
Name of the Button control whose server click code will be run. This control must belong to the specified page.
<Target>: Optional character string or constant
Name of target frame. <Destination> can also take the following values:
CurrentBrowserthe target is the current browser.
This parameter can also correspond to the "_top" string (compatibility with WEBDEV 1.5).
CurrentFramethe target is the current frame (default value).
This parameter can also correspond to the "_self" string (compatibility with WEBDEV 1.5).
NewBrowserthe target is a new browser (a new browser window is opened). The following parameters of PageSubmit are used to configure this new window.
This parameter can also correspond to the "_blank" string (compatibility with WEBDEV 1.5).
ParentFramethe target is the container of the current page (parent frameset, parent browser).
This parameter can also correspond to the "_parent" string (compatibility with WEBDEV 1.5).
<Browser window>: : Optional character string
Window name in the new browser if <Target> is set to the NewBrowser constant. This parameter allows you to redisplay a page in a browser with the same name (if several browsers are opened on the computer of Web user).
<Options>: Optional Integer constant (or combination of constants)
Window parameters in the new browser if <Target> is set to the NewBrowser constant:
ONFull
(Default value)
The window of the new browser will include all the options (equivalent to the combination of all constants).
ONLinkThe link bar will be displayed.
ONLocationThe address bar will be displayed.
ONMenuBarThe menu bar will be displayed.
ONResizableThe window of the new browser will be resizable.
ONSatusBarThe status bar will be displayed.
ONScrollbarThe scrollbars will be displayed.
ONSimpleThe window of the new browser will be a simple window (no combination of constants).
ONToolbarThe toolbar will be displayed.
<Width>: Optional integer
Width of window in the new browser (in pixels).
<Height>: Optional integer
Height of window in the new browser (in pixels).
<Horizontal position>: Optional integer
Horizontal position (in pixels) of the window in the new browser (in relation to the upper-left corner of the screen).
<Vertical position>: Optional integer
Vertical position (in pixels) of the window in the new browser (in relation to the upper-left corner of the screen).
<JavaScript parameters>: Optional character string
Other Javascript parameters that must be used when opening a new browser if <Target> is equal to the NewBrowser constant.
Remarks

Caution: a single action can be performed at a time on the same page

PageSubmit 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.
For example, if a process sends a page to the server (PageSubmit) and opens the messaging software (EmailOpenMail), only the last action (opening the messaging software) will be performed.
Caution: Some types of buttons automatically trigger an action on the page ("send to server" button, "other" button whose action differs from "none"). If PageSubmit is used in the browser click code of these buttons (or in a procedure called by this process), this function will be ignored: only the action of the button will be performed.
Consequences: PageSubmit cannot be used in a code triggering an action (automatically or not). This function is ignored:
  • In the click code of a "submit" button.
  • In the click code of an "other" button whose action is different from "none".
  • If it is followed by PageSubmit or EmailOpenMail (in the current process, in a procedure called by the current process or in another process called by Execute).

Using PageSubmit from a Button control

To use PageSubmit from a Button control (browser click code of the control) this control must have the following characteristics:
  • Type of button: "Other".
  • Action: "None".

The name of the Button control corresponds to a variable or a built string.

If the name of the Button control corresponds to a variable or a built string (for example: "CONTROL"+nControlNumber), no check can be performed during the compilation. Any error will trigger a JavaScript error or an HTTP error when using the function.
Component: WDJS.DLL
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help