LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make the LabVIEW CGI write to the same client window twice?

I'm building a CGI VI using LabVIEW 6i and the Internet Dev. Toolkit. I would like this VI to write to the same client browser window twice. The first reply will just be a confirmation that the form has been submitted, and the second reply will be the results from a measurement. Is there any way this can be done? I have tried to use the "CGI Write Reply.vi" twice in the same CGI VI, but only the first reply is received in the client window.
0 Kudos
Message 1 of 4
(2,859 Views)
Raymond,

With a CGI transaction, you're pretty much going to get a single reply to the browser for each submit request made to the CGI routine. That tends to be the case regardless what technology you're using for your CGI.

The question is: can you combine the two ideas (form confirmation and measurement results displayed) into one response? In fact, if the form being submitted is basically a request to see measurement results, why not skip the confirmation step and just show the results?

More info might help me or someone else give a more thorough response.

Regards,
John Lum
National Instruments
0 Kudos
Message 2 of 4
(2,859 Views)
John,

Thanks for your reply.

The problem is that the measurement can take some time, thus I would like a first reply with an estimate on how long time it will take. The time depends on how many series of measurements are made and how many clients are waiting to perform a measurement.

The preliminary measurement setup can be seen at http://aimlab.unik.no:8000/

Regards,
Raymond Berntzen
0 Kudos
Message 3 of 4
(2,859 Views)
Very nice interface! It sounds like you might want two separate steps and two separate CGIs (or one CGI with a "step" flag). Here's one idea:

1. Pass the configuration info from the form, initiate the measurement, and return a confirmation page to the user. Embed something in the result page (a hiddden variable on a second form, perhaps?) that will identify the measurement that was requested upon a subsequent CGI call.

2. Either have the second form/CGI automatically submit itself after time T, or else allow the user to submit it. Use the hidden variable to identify which results set is being requested. If the measurement is finished, return the results; otherwise, return another confirmation page with a new time estimate.

Best of luck,
Jo
hn
0 Kudos
Message 4 of 4
(2,859 Views)