PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Caution: a single action can be performed at a time on the same page
  • Using PageSubmit from a button
  • The button 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
PageSubmit (Function)
In French: PageValide
Validates the specified page and starts the execution of a button. Only the server code of 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 full process 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 Name> , <Button Name> [, <Target> [, <Window Name> [, <Options> [, <Width> [, <Height> [, <Horizontal Position> [, <Vertical Position> [, <Javascript Parameters>]]]]]]]])
<Page Name>: Character string (with or without quotes)
  • 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 Name>: Character string (with or without quotes)
Name of button 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:
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).
CurrentFramethe target is the current frame (default value).
This parameter can also correspond to the "_self" string (compatibility with WEBDEV 1.5).
CurrentBrowserthe target is the current browser.
This parameter can also correspond to the "_top" 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).
<Window Name>: : Optional character string (with quotes)
Name of window in the new browser if <Target> is equal 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 window in the new browser if <Target> is equal to the NewBrowser constant:
ONLocationThe address bar will be displayed.
ONScrollbarThe scrollbars will be displayed.
ONFull
(Default value)
The window of new browser will include all the options (equivalent to the combination of all constants).
ONResizableThe window of new browser will be resizable.
ONLinkThe link bar will be displayed.
ONMenuBarThe menu bar will be displayed.
ONSatusBarThe status bar will be displayed.
ONToolbarThe toolbar will be displayed.
ONSimpleThe window of the new browser will be a simple window (no combination of constants).
<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 window in the new browser (in relation to the top left corner of the screen).
<Vertical Position>: Optional integer
Vertical position (in pixels) of window in the new browser (in relation to the top left corner of the screen).
<Javascript Parameters>: Optional character string (with quotes)
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, the Internet browsers allow a 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

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

The button corresponds to a variable or a built string.

If the name of the button corresponds to a string that is built (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.
Components
WEBDEV - Browser code WDJS.DLL
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment