Assigning a progess variable from a javascript variable

progdev1

Member
Hi, i am wondering if anyone can help me. Does anyone know, is it possible to assign the value of a javascript variable to a progress variable.

I have two frame in a window. The left frame shows a report and the right frame show the parameters for the report. When the report is selected on the menu initially we load the parameters from a database table. display the report to screen and then output the same report to excel.

I want to store the paramter in the right screen in a progress variable, for use in generating an excel report later on. I tried assigning it to a hidden field and using javascript
this.document.form1.CustomerName.value = parent.rightFrame.document.form1.Customer.options[parent.rightFrame.document.form1.Customer.selectedIndex].text~;~n'
and then using

vcCustomerName = get-value("CustomerName").

However this is returning blank because although the CustomerName hidden field was set during the initial load of the screen CustomerName hidden field was blank when the screen was loaded and the get-value seems to take value when the screen was initially submitted.

I can't really use the database table table because it hold the customer number and the right hand frame holds the customer name. I was wondering if it is possible to do something like this does anyone know.
{&OUT} '<HEAD>~n'.
{&OUT} ' function getCustomerName()~n'.
{&OUT} ' ~{~n'.
{&OUT} ' return parent.rightFrame.document.form1.Customer.options[parent.rightFrame.document.form1.Customer.selectedIndex].text~;~n'.
{&OUT} ' ~} ~n'.
{&OUT} ' </SCRIPT>~n'.
{&OUT} '</HEAD>~n'.
{&OUT} '<BODY>~n'.
......
{&OUT} '<SCRIPT Language="JavaScript">~n'.
{&OUT} vcCustomerName = ' getCustomerName()~n'.
{&OUT} ' </SCRIPT>~n'.
.....
{&OUT} '</BODY>~n'.


Any ideas would be appreciated.
 
only a other way for your reference
you can design a ACTIVEX component in WIN32 and use it in your web page, it can hold the parameter, also you can make it own export XLS function by ODBC for progress .
 
Top