Solved

Redirecting within frames

Posted on 1998-07-25
5
145 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
  • 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
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…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
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…

708 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

17 Experts available now in Live!

Get 1:1 Help Now