Solved

loading a pre-build HTML file from CGI

Posted on 1998-10-26
6
165 Views
Last Modified: 2013-12-25
How do you load an exiting HTML page from CGI that
would open a new page on screen rather than replacing
the existing page of the current browser.
My current script does the following:
printf("<html><head><meta-equiv='refresh' content='0; url=
http://mypage.html'></head><body</body></html>");
of course it works but it replaces my current page on the
browser. I want it on a separate popup screen without
browser's toolbar and menu (like an applet popup).
0
Comment
Question by:trinh
  • 2
  • 2
  • 2
6 Comments
 
LVL 1

Expert Comment

by:wisdom042597
ID: 1829298
Try adding target="_new" to the original A HREF for the script reference (assuming it's clickable).  This will open a new browser instance when the script URL is run.

0
 

Author Comment

by:trinh
ID: 1829299
No, Adding the target tag does work. In fact, it hangs
the browser indefinitely.
0
 
LVL 1

Expert Comment

by:wisdom042597
ID: 1829300
Try outputting a mime redirect header that references a static page, as in:

Location: http://xxxxxxx
(extra carrage return)


0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:trinh
ID: 1829301
Still doesn't work
0
 
LVL 8

Accepted Solution

by:
MaDdUCK earned 50 total points
ID: 1829302
I think the only solution to your problem would involve JavaScript:

==
<html>
<head><title>This page will stay</title></head>

<body OnLoad="window.open('/path/to/other/page.html','','resizable=yes,width=480,height=360,scrollbars=yes'); return false">

</body></html>
==

have fun,
MaDdUCK
0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1829303
or just "window.open('/path/to/other/page.html'); return false"
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

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

832 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