If you're already using JavaScript, you can set a variable in the parent window as the child window closes (or on the OnBlur event, when it loses focus). The variable that was set can then be passed to the CGI script with standard CGI techniques.
The other non-JavaScript (and many would say better) way is simply to move to another page to enter that data, and return to the previous page when complete. You can maintain your state variables either be using hidden fields, or using one of the several state packages (or your own in a database, or the web server, or whatever. Just make sure you're not opening yourself to security issues, where someone can hack a variable and do some damage).
There are a number of nodes on the site that talk about the various methods of maintaining state variables in a CGI environment. Type 'super search' in the search box at the top, and try words like 'state maintain', etc. You may have to do a little poking around to get a good hit.
--Chris
e-mail jcwren | [reply] |
You can refer to windows by name, so from your child window, just have your javascript access your form object(s) underneath this main window. I'm no JavaScript expert, but instead of doing something like this:
myform.inputvar.value = 'whatever';
do
mainwindow.myform.inputvar.value = 'whatever';
or whatever other objects you have to work with between 'mainwindow' and 'myform'. You may wish to consider consulting any of the thousands of JavaScript-oriented web sites on the 'Net for information on accessing objects in multiple windows. | [reply] [d/l] [select] |