Can I have the CGI open in the background?

Posted on 2008-06-13
Medium Priority
Last Modified: 2013-12-25
I want to pass form data, but not have my page taken to the CGI script.
Is it possible to have CGI run in the background, possibly in another window that doesn't take focus away from the window that submits the form data?

I'm basically using an html page to store notes.  Therefore I just want to be able to save the data, and not
lose focus on the page or have it reload.

Also.  We use Red Hat, Mozilla/Firefox, and my CGI is in Python.

Thanks in advance.
Question by:pha1anx
LVL 44

Expert Comment

ID: 21783799
My initial thought was "NO", because CGI is a real-time processor that works until it completes, then it releases command of the browser to the previous state before the CGI was called.  So if you want to do this, it probably will work --

1/ set up a hidden Iframe on your web page.  When the form data is complete and is going to be submitted to the CGI, have the CGI send the results to the hidden Iframe.  Then control of the browser will be returned to the main page where the form was submitted.  But the CGI output will be available in the iframe to be retrieved by javascript on the client browser.

Mind you, this is advanced programming.  If you don't understand what I just said above, the answer is NO, you will probably not get this to work, but if you understand it all, then that is the way to make it work

Accepted Solution

pha1anx earned 0 total points
ID: 21787041
Thanks scrathcyboy.  
I think the key word is 'remote scripting'
I found this page very useful.

LVL 39

Expert Comment

ID: 21793737
You could use AJAX.  It is built on javascript, and allows a web browser to send data to a server, and get a response.  This site has very good info on AJAX:

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question