Advanced VSPX programming
VX-S-7 VSPX browse button control
Pop-up select list
Example
This example repeats the VX-S-3(data-set), but it also introduce the vspx:button with special functions browse and select. These buttons are to make inter-page communication, in our case to establish the foreign key relation ship between Products and Categories tables from Northwind demo database.
The browse button represents a HTML button which will pop-up the window to make selection. The special attributes selector and child-window-options are used to indicate which link should be used for pop-up and how to display the child browser window.
The selector window (child) is also an data-set over Categories table and contains special button with name of data-set control suffixed with '_select'. This is a Java script button which will return back to parent window the selected data and will close the window after selection is made.
Both buttons have as children elements vspx:field, these are markers to the buttons which control value and must be used to link both pages. The name attribute of these is the same of the control which needs to be selected or filled with the data. In that way this is a exception of unique names in the page.
Please note that both controls instruct VSPX compiler to add client-side Java script functions to maintain functionality. Hence disabling the Java script on browser will made these to stop working.
In our example the discussed functionality is demonstrated with buttons Browse in rows to insert and when do an update of products page. Hitting on one of these will pop-up a window to select appropriate foreign key value.
| View the source | Action |
|---|---|
| 1. products.vspx | Run |
| 2. sel_category.vspx |
OpenLink Home
Technical Support