Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 3rd, 2000, 07:21 AM
doc doc is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Higher Bebington,Wirral,UK
Posts: 5 doc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 43 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old August 3rd, 2000, 05:40 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Start here -> http://www.devshed.com/Talk/Forums/Forum6/HTML/000258.html

Window-target is what you needed.

Reply With Quote
  #3  
Old August 3rd, 2000, 07:54 PM
doc doc is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Higher Bebington,Wirral,UK
Posts: 5 doc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 43 sec
Reputation Power: 0
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:mybotn";
print "Content-type:text/htmlnn";
print "<html>n";
print "<body>n";
print "Hellon";
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="testtop.htm" name="mytop">
<frame src="testbot.htm" 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="../cgi-bin/test.pl" 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).]

Reply With Quote
  #4  
Old August 4th, 2000, 05:05 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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="../cgi-bin/test.pl" target="mybot">

Reply With Quote
  #5  
Old August 4th, 2000, 10:41 AM
doc doc is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Higher Bebington,Wirral,UK
Posts: 5 doc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 43 sec
Reputation Power: 0
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

Reply With Quote
  #6  
Old August 4th, 2000, 10:11 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>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

Reply With Quote
  #7  
Old August 5th, 2000, 04:09 PM
doc doc is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Higher Bebington,Wirral,UK
Posts: 5 doc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 43 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Selecting target frames from server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT