Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI loads new web page, should only access files

Status
Not open for further replies.

DrCrazyDog

Programmer
Nov 26, 2000
8
0
0
US
I have a flash animation calling a CGI script.

When i use Netscape, any version, everything is fine, but if i use Internet explorer, the CGI script loads a new page in the browser window and leaves my flash animation. I want it to stay in the flash animation while the cgi script loads and accesses the files i am having it access. it's best if viewers don't even see the CGI script in action.

How might i fix this? i am fairly certain it is a CGI problem not a flash problem. thanks in advance
 
By default, your stdout goes to the web browser. You need to redirect stdout to somewhere else such as a file or /dev/null. Or fork your process to the background. Otherwise, the correct response is to output to the web browser. A simple solution would be to make your CGI script output a 1 pixel x 1 pixel transparent gif, and then call your CGI via <img src=&quot;your.cgi?param=val&quot; width=1 height=1>. This way it still outputs to your browser, and you don't have to worry about forking or anything, but it only alters the display by creating an invisible image.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
okay, i'm not experienced so go slow. i assumed that when you said set stdout to /dev/null you meant something like print &quot;Content-type: /dev/null\n\n&quot;; at the top of my cgi script, however, when i try that my browser asks me if i want to download a file of type /dev/null.
i also do not know how to set a file as stdout, and i do not think i can use an img tag. i am coming from a flash animation using getUrl. thanks for any further help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top