Solved

Redirecting within frames

Posted on 1998-07-25
5
150 Views
Last Modified: 2013-12-25
I would like to make a dropdown box for navigating my site.

I'm using this line to change page:
print "Location: $myip/$url\n\n";

The problem is that the page shows in the same frame as the form im calling the perl script from. So how do i tell a perl script to use a target frame to open it's links in?

Hope someone can help.
CYA. Martin
0
Comment
Question by:freak022398
[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
  • 3
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
alamo earned 50 total points
ID: 1831166
You might be able to do it from your script, but only for Netscape: Include a header line

Window-target: targetframe

I am not sure if it will work with a Location: redirect at all, normally Location is the only header line and the page referred to in the Location address might be the one which needs to include this header. I'll check.

But this is a Netscape-only extension to html, and isn't the best way to do it anyway. The best way to do it is in the html that calls your script. In the form tag for the form including your dropdown you should include target=targetframe. The output of the form (which is the location your script redirects to) will show up in the indicated frame.

Hope this helps!
0
 
LVL 6

Expert Comment

by:alamo
ID: 1831167
I just checked, and Window-target doesn't with with Location. So the better method turns out to be the only method anyway.
0
 

Author Comment

by:freak022398
ID: 1831168
I will have to find a solution that works on all browsers.
That's a must as i'm going to have a large Amiga public domain
archive.

I have tried different things, both in the perl and the html.
My table looks like this:

<FORM action="/cgi-bin/_go_page.pl" method="POST"><p>
  <select name="goto" size="1" >
    <OPTION Value="martin/home.html">Martin
    <OPTION Value="jacob/home.html">Jacob
  </SELECT>
  <input type="submit" value="Go">
</FORM>

And i have tried:
<OPTION Value="jacob/home.html" target="main">Jacob
(Without the $myip/ part in the perl parl.

So i don't know what couldt be wrong?

CYA. Martin.

0
 
LVL 6

Expert Comment

by:alamo
ID: 1831169
Change your form tag so it's:

<FORM action="/cgi-bin/_go_page.pl" method="POST" target="main">

and the location where _go_page.pl redirects to will show up in the frame "main".
0
 

Author Comment

by:freak022398
ID: 1831170
Great. That took care of that :)

Thanks for the fast reply.

CYA. Martin.

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

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
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 …
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

749 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