Solved

Can I have the CGI open in the background?

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
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…

743 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

11 Experts available now in Live!

Get 1:1 Help Now