![scriptcase pass global variable to tab form scriptcase pass global variable to tab form](https://tldp.org/LDP/Bash-Beginners-Guide/html/images/script1.sh.png)
- #Scriptcase pass global variable to tab form how to
- #Scriptcase pass global variable to tab form update
- #Scriptcase pass global variable to tab form full
- #Scriptcase pass global variable to tab form code
#Scriptcase pass global variable to tab form update
Update 2: To pass an array instead, you would do something like this: var myarray = new Array()
#Scriptcase pass global variable to tab form how to
There's also a way to return an object from the child window (which becomes the value returned from the showModalDialog call itself), but I don't recall how to do this. This shows the basic way in which you pass data to the child and get data back from it.
![scriptcase pass global variable to tab form scriptcase pass global variable to tab form](https://i2.wp.com/goharpc.com/wp-content/uploads/2021/06/build-new-application.jpg)
The child window will display the values set in the parent window ("some data 1" and "some data 2"), and when the child window is closed, whatever you've entered in the third text box will be displayed in an alert box called from the parent. Then open Parent.htm in a browser and click the "CustomConfirm" button. Var tb2 = document.getElementById('textbox2') Var tb1 = document.getElementById('textbox1') Create two HTML files in the same folder, and name them "Parent.htm" and "Child.htm".
#Scriptcase pass global variable to tab form code
Update: here is a very simple code sample that shows the basics of passing data back and forth between the parent and child windows using showModalDialog.
![scriptcase pass global variable to tab form scriptcase pass global variable to tab form](https://softwarebrother.com/sfimages/file-transfer-and-networking/mobaxterm-screenshot-01.png)
Hang on a second and I'll include a code sample (it's been about 10 years since I've done this). Do you already know Scriptcase? Download the free version of our tool and discover a world of new possibilities.The middle parameter for showModalDialog can be an object or an array or anything you like, and this passed object can be retrieved in the child form (say, in its OnLoad event) by referencing window.dialogArguments. Learn more about this and other features that Scripcase offers. For example:Īnd we can use the macro sc_apl_conf to start a application form already in insert mode (new), using it on the OnApplicationInit event. We can use the macro sc_redir redirect from an application to a website too. On the form, we will select a record, verify the primary key, and hit the button to redirect the detail that we did.Īnd on the detail, we have only the records that have the same key, and we used the macro sc_apl_conf to configure the application to show only one record, will be this:Īnother example of using the macros sc_redir and sc_apl_confīoth macro sc_redir and sc_apl_conf, have other features besides those that we’ve mentioned before. Now we will use the macro sc_apl_conf to provide only 1 record per page on the grid, if it have 2 or more records. Now the redirection button is done, we have to configure the receipt of the redirect parameter on the grid, on the “SQL” option on Scriptcase, and we will do a where and declare the variable with the redir made on the form, which was transformed into a global variable. Initially we will have a button to redirect the form to the grid, with the parameter passing the orderid field.
![scriptcase pass global variable to tab form scriptcase pass global variable to tab form](https://cbackup.readthedocs.io/en/latest/assets/processes1.png)
The macro sc_apl_conf is used when we need to change an application proprieties, for example, open a form in addition mode or change the number of row from a grid dynamically. The sc_redir macro is commonly used when there is a need to make a redirection from one application to another. In this example we will use both macros to redirect from a form application (using the ‘order’ table) to a grid application (using the ‘order_detail’ table), we will use the sc_redir macro to call the grid application passing the primary key as parameter to filter the grid application, and we will the sc_apl_conf macro to change the grid application to set it to show an specific number of lines per page.
#Scriptcase pass global variable to tab form full
You can check the full list of macros at this link Scriptcase has more then 150 created macros to help you to insert your own business rules. Macros on Scriptcase is the same as in any other programs, it is a saved sequence of commands or keyboard strokes that can be stored and then recalled with a single command, it is the same as a function from PHP.