★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum6/HTML/000305.htmlNouvelle recherche | Portail wanayoo
DevShed Menu
* DevShed Home
* Developer News
* DevShed Brain Dump




UBBFriend: Email This Page to Someone!
  DevShed Discussion Forums
  Perl
  Selecting target frames from server

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Selecting target frames from server
doc
Junior Member
posted August 03, 2000 05:21 AM     Click Here to See the Profile for doc   Click Here to Email doc     Edit/Delete Message Reply w/Quote
Hi,
I have a web page with 3 frames. One frames has a form with submit button - the target attribute is understood. When the form is submitted, it triggers a perl cgi programme. Depending on various parameters in the form the perl programme has to decide which frame (all 3 have been named) to send the resulting dynamic html info to. How can I set the frame it will go into from the cgi programme? Presumably I need to overwrite what is in the form's target attribute - but how?

Thanks in advance
doc

freebsd
Member
posted August 03, 2000 03:40 PM     Click Here to See the Profile for freebsd     Edit/Delete Message Reply w/Quote
Start here -> http://www.devshed.com/Talk/Forums/Forum6/HTML/000258.html

Window-target is what you needed.

doc
Junior Member
posted August 03, 2000 05:54 PM     Click Here to See the Profile for doc   Click Here to Email doc     Edit/Delete Message Reply w/Quote
I tried the recommended method with no success. Here is the perl code and the very simple frameset used.
Perl:
#! /usr/bin/perl
use CGI;
print "Window-target:mybot\n";
print "Content-type:text/html\n\n";
print "<html>\n";
print "<body>\n";
print "Hello\n";
print "</body>\n";
print "</html>\n";
exit;
Frameset:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<frameset rows="243,244">
<frame src="/old?u=http%3A%2F%2Fwww.devshed.com%2FTalk%2FForums%2FForum6%2FHTML%2Ftesttop.htm&y=1999" name="mytop">
<frame src="/old?u=http%3A%2F%2Fwww.devshed.com%2FTalk%2FForums%2FForum6%2FHTML%2Ftestbot.htm&y=1999" name="mybot">
</frameset>
<noframes><body bgcolor="#FFFFFF">
</body></noframes>
</html>
TopFrame:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<form method="post" action="/old?u=http%3A%2F%2Fwww.devshed.com%2FTalk%2FForums%2FForum6%2Fcgi-bin%2Ftest.pl&y=1999" target="">
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>
Bottom Frame:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
</body>
</html>
In practice perl will decide after database check which frame to send html code to. What is wrong??
Thanks, again.

[This message has been edited by doc (edited August 04, 2000).]

freebsd
Member
posted August 04, 2000 03:05 AM     Click Here to See the Profile for freebsd     Edit/Delete Message Reply w/Quote
You don't need to use "Window-target" for your given example, simply specify the target within your <form> tag should be fine.

<form method="post" action="/old?u=http%3A%2F%2Fwww.devshed.com%2FTalk%2FForums%2FForum6%2Fcgi-bin%2Ftest.pl&y=1999" target="mybot">

doc
Junior Member
posted August 04, 2000 08:41 AM     Click Here to See the Profile for doc   Click Here to Email doc     Edit/Delete Message Reply w/Quote
Thanks for the suggestion but the poin
t I'm trying to make is that the decision which frame to send the html to has not been made when the form is sent - so setting the target on the form does not help. Info from the form is processed in the cgi programme on the server - this programme then decides which frame the html should go to. Hence the need to change the target for the html from within the cgi programme.
Cheers
doc

freebsd
Member
posted August 04, 2000 08:11 PM     Click Here to See the Profile for freebsd     Edit/Delete Message Reply w/Quote
>>this programme then decides which frame the html should go to

Then you need "Window-target". Once again, your example doesn't do what you mentioned.
Okay, start here -> http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/target.html

doc
Junior Member
posted August 05, 2000 02:09 PM     Click Here to See the Profile for doc   Click Here to Email doc     Edit/Delete Message Reply w/Quote
Hi
I have now found out that target and window-target (sent from a cgi script) only work with Netscape and not I.E. (I know that it works for both when target is used in a form). So, what I was trying to do cannot be achieved i.e. getting the cgi programme to send HTML to one of two frames while leaving the other unaffected - the choice of frame to be sent the HTML being made by the cgi programme -so the form method is not relevant. It would help if someone could confirm this.

Thanks
doc

All times are MST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | DevShed.com

Copyright © 1997-2000 ngenuity. All rights reserved.

Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.