Solved

Can I have the CGI open in the background?

Posted on 2008-06-13
3
169 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now