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
  • Please note: only one 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
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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.
This function is reserved for very specific uses.
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)
Parameters of the new browser window 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 to use when opening a new browser if <Target> is set to the NewBrowser constant.
Remarks

Please note: only one 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.
Attention: Some button types automatically trigger an action on the page ("send to server" button, "other" button with action other than "none").. If the PageSubmit function is used in the browser-click processing of these buttons (or in a procedure called by this processing), this function will be ignored: only the button action will be performed.
Consequences: The PageSubmit function cannot be used in a code that (automatically or not) causes an action.. This function is ignored:
  • In the click code of a "send to server" button.
  • In the click code of an "other" button whose action differs 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:
  • Button type: "Other".
  • Action: "None".

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

If the Button field name corresponds to a variable or a constructed string (e.g.: "FIELD "+nFieldName), no verification is possible at compile time.. 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: 09/30/2024

Send a report | Local help