Solved

Can I have the CGI open in the background?

Posted on 2008-06-13
3
172 Views
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.
0
Comment
Question by:pha1anx
3 Comments
 
LVL 44

Expert Comment

by:scrathcyboy
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
0
 

Accepted Solution

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

http://developer.apple.com/internet/webcontent/iframe.html
0
 
LVL 39

Expert Comment

by:Adam314
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:
    http://www.w3schools.com/ajax/default.asp
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
div to fit another div 8 23
Why a span is lower 2 20
Outlook opens HTML email as text 4 24
Little bit of help styling my heading 3 21
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

803 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