On Sat, 1 Mar 2003 10:49:55 -0800, [EMAIL PROTECTED] (Maureen E
Fischer) wrote:

>I have recently finished an online database system using perl/cgi.  It
>has been suggested that it would lend itself to using HTML frames.
>I have a main menu that could always be shown and what is selected from it
>would refresh another frame.  I have never used this before but what I see
>is identiflying what goes into the frame by using SRC= a file name.  This
>worked fine for the heading which is a gif file logo, but the data is
>accumulated using multiple database reads and collected into tables.
>I am using a perl here statement to output this data.  So is there a simple
>way to do this?  Do I have to write my HTML to an intermediate file and then
>refer to that using the SRC attribute?

No you don't have to write an intermediate file, but it can get tricky.
The best thing you can do is setup a little example page to experiment
with, get the idea down, then add more complexity to adapt to your
problem.  Basically you need to get the idea of printing your links in a
manner which print to the appropriate frame target. Say you have 4
frames,top,left,main,and bottom.  You can have a menu in the left frame,
and the results in the main frame. But when you print results to main,
the target of the links in main, should be self. Or when you click a
link in the left menu, that updates the left menu, the target should be
self; but links that return results to the main frame, need the target
= frame.  I'm sure once you get past that hurdle, you will have an easy
time.  You also need to update frames occaisionally, which alter all
the links. 

Here is just a snippet to show you what the perl would look like
to generate some html for frames. This will generate a search menu
in the left(menu) frame, it's called from the left, and returns the html
links to the left.  But when search results links are returned from the
search, (code not shown) the links created point to target=main, since I
want the results to go to the main frame.

You can even make the target a variable, like "target=$target" , it all
depends on how ingenious you want to get.

If you want to see my first attempt at this, go to 
http://zentara.net/store/admin.html  and play around.
The password is z-store
Try the Inventory Management, and look how the links get
setup.

You can download the script if you want to look at it.
It is not the best, but it will show you the idea.
http://zentara.net/downloads/perlshop-z.zip


You might want to setup your browser to use your chosen
colors to see the frames better, because I have them background=
black to hide the frame boundaries.


sub displaysrchmenu{
print<<"PRINT_END";
<b><font color=#FFFF00>SEARCH INVOICES MENU:</font></b><br><hr>
Enter your start and end dates in the format <b>mmddyyyy</b><br>
Start defaults to 01012002<br>
End defaults to current date<br><hr>
<center><b>or</b></center>
Enter a name to search for, or both<br><hr>
You must fill in at least 1 field<br><hr>
<form method=post target=_self
$secure_server_address$cgi_directory/admin.cgi>
<input type=hidden name=PASSWORD value=$input{PASSWORD}>
<table><tr><td align=left>Start: </td>
<td align=left><input type=text size=18 name=DSTART></td>
</tr><tr><td align=left>End: </td>
<td align=left><input type=text size=18 name=DEND></td></tr>
</tr><tr><td align=left>Name Search: </td>
<td align=left><input type=text size=18 name=SNAME></td></tr>
<input type=hidden name=ACTION value='SEARCH INVOICES'>
<input type=hidden name=INVACTION value='DO SEARCH'>
<input type=submit value='Get Them'></td></tr></table></form>
<form method=post target=_top
$secure_server_address$cgi_directory/admin.cgi>
<input type=hidden name=PASSWORD value=$input{PASSWORD}>
<input type=hidden name=ACTION value=EXIT>
<input type=submit align=left value=Exit></form>
PRINT_END
exit;
}


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to