Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CGI script returning a HTML document to a given frame

Posted on 1997-05-25
1
Medium Priority
?
196 Views
Last Modified: 2013-12-25
How to have a CGI script return a HTML document to a given frame ?

I defined a frameset with two frames frameA and frameB.
I defined a form formX in frameB.
Should the user submit formX, I want the CGI script to return a HTML document
which modifies frameA and not frameB.

It's easy with a simple hyperlink:

<A TARGET="frameA" HREF="http://www.something.com">

But this doesn't work with javascript:

<A TARGET="frameA" HREF="javascript:'window.top.frameB.document.formX.submit ()'">

How to proceed ?
0
Comment
Question by:stormtrooper
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
Trevor013097 earned 200 total points
ID: 1828097
Are you using a CGI script or Javascript.  A CGI would be done server side using something like Perl and Javascript is client side.

From what you have posted you don't need the TARGET when using Javascript as the targeting is done by Javascript itself.  You should place what it is you want to do into a function and then call the function.

For Example

<SCRIPT LANGUAGE="Javascript">

function returnPage() {
  parent.frameB.location="page-name.html"
}

</SCRIPT>

Place the above in the <HEAD> secton of your page.

Then in your body use the following for a hypertext link:-

<A HREF="javascript:returnPage();">Return Page</A>

or to have the function called when your form is submitted use the following in the opening <FORM> tag:-


<FORM NAME="name_of_form" ACTION="your-action" onSubmit="returnPage()">

Hope this helps,

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

610 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