W3C home > Mailing lists > Public > www-talk@w3.org > May to June 1996

Perl and Frame re-directs

From: Steven Elliott <elliott@cibertribe.pt>
Date: Thu, 30 May 1996 16:47:10 +0000
Message-Id: <31ADD10E.41C6@cibertribe.pt>
To: www_talk <www-talk@w3.org>
Cc: Rauno Haapaniemi <reneh@netppl.fi>
Maybe I am not making myself clear since two individuals have replied
to my queries without understanding the question.

In order to facilitate some understanding of what the problem is I have
included a abreviated sample of what I am trying to work out.  And I
will restate the question in long hand.

If I use a form to submit arguments to my PERL script how can I direct
the output of the PERL script to object windows (frames).  For instance
if I construct a HTML page with 3 frames.

In one frame is the result of the query which in this case is another
form (ie. the user selected movies and the form offers selection of
several categories of movies).

Another frame offers the user the possiblity to rent or buy the movie
and in this frame are the appropriate input fields such as if the user
is a member then they can do this directly by entering in their code and
if they are not a member they can be by selecting this option etc.

In a third frame is an ad which is selected from a database of ads. The
ad to be placed is based on the user input of category (ie. The Lion
King would appear if the category movie was chosen. If the user had
selected music Frank Zappa would have been chosen to appear in the ad
frame.)


Following is some of the PERL script.  WHAT is missing is some means to
"print" different HTML docs to different  "targets"

###!/bin/sh
##perl=/usr/sbin/perl
##eval "exec $perl -x $0 $*"

#here I would have the input parsed passing the arguments to where they
should go.

#based on the above input I want to direct a form to frame
"target='selection'"

#also based on the input I want to refresh another frame
"target='index'"


#this is the PERL print statment for the first form output to
"target='selection'"
{
print	"<HTML>\n", 
	"<HEAD>\n",
	"<title>P O R T U G A L  O n l i n e</title>\n",
	"</HEAD>\n",
	"<BODY BGCOLOR=\"\#000000\" TEXT=\"\#d1d1d1\">\n"; }

	<FORM>
	"<BR><INPUT TYPE=\"submit\" NAME=\"Select\"
VALUE=\"Sele&ccedil;&atilde;\">  Enviar Mensagem \n",
	" . . Voltar &aacute;tras \n<INPUT TYPE=\"text\" SIZE = \"5\"
NAME=\"voltar\"> mensagems",
	"<TEXTAREA NAME=\"InputText\" ROWS=2 COLS=60></TEXTAREA><P>\n",
	"Nome:  <INPUT NAME=\"name\" VALUE=\"$in{name}\"><p>\n",
	"Image:  <INPUT TYPE=\"text\" SIZE = \"50\" NAME=\"image\"", 
	"VALUE=\"$in{image}\"><P>\n",
 	"</FORM>",

	"</BODY>",
	"</HTML>";
}

#this is the PERL print statement for the second form.
{
print	"<HTML>\n", 
	"<HEAD>\n",
	"<title>P O R T U G A L  O n l i n e I n d e x</title>\n",
	"</HEAD>\n",
	"<BODY BGCOLOR=\"\#000000\" TEXT=\"\#d1d1d1\">\n"; }

#	Some more form information
	
	"</BODY>",
	"</HTML>";
}


The question remains the same - How can one redirect HTML docs to
different frames from WITHIN a PERL script????

Steven Elliott
elliott@cibertribe.pt
Received on Thursday, 30 May 1996 11:48:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:19 GMT