|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
Start here -> http://www.devshed.com/Talk/Forums/Forum6/HTML/000258.html
Window-target is what you needed. |
|
#3
|
|||
|
|||
|
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).] |
|
#4
|
|||
|
|||
|
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"> |
|
#5
|
|||
|
|||
|
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 |
|
#6
|
|||
|
|||
|
>>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 |
|
#7
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Selecting target frames from server |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|