On Saturday, Mar 1, 2003, at 10:49 US/Pacific, Maureen E Fischer wrote: [..]
Do I have to write my HTML to an intermediate file and then

refer to that using the SRC attribute?

Working with Frames will be messy any way you cut it.


But I have a project that we did using frames - and I
came up with several basic functions that work for me.

In our case we have a 'VertNav' section that contains
what are dynamic buttons for navigation on the left,
and a "MainBody" section that contains the 'dynamically
built' part of the project. The MainBody is then broken
into two section "MainHead" and "MainData" whether the
former is the horizontal navigation buttons that are
dynamically loaded, and the MainData section the generic
play pen for data.

So I have a top level 'index.cgi' which generates:

[jeeves: 1:] GET http://xanana/HqAdmin/

<html><head><title>HQ Aministration Web Tool</title></head>
<frameset border="0" cols="135,*" frameborder="no" framespacing="0">
  <frameset border="0" rows="97,*" frameborder="no" framespacing="0">
    <frame name="HqIcon" scrolling="no" src="html/icon.html">
    <frame name="VertNav" src="L1/L1_VertNav.cgi">
  </frameset>
  <frame name="MainBody" src="L1/L1_MainBody.cgi">
</frameset></html>
[jeeves: 2:]

you will notice that this uses both a 'static' html/icon.html to plonk the corporate logo into place - this worked out to be the simplest method for solving the cross platform problems.

I then have the rest pointing to the appropriate cgi code that
will resolve what needs to be done in their respective frame sets

likewise with the levels down:

[jeeves: 2:] GET http://xanana/HqAdmin//L2/

<html><head><title>Level Two Of the Hq Admin Tool</title></head>
<frameset border="0" cols="135,*" frameborder="no" framespacing="0">
  <frameset border="0" rows="97,*" frameborder="no" framespacing="0">
    <frame name="HqIcon" scrolling="no" src="../html/icon.html">
    <frame name="VertNav" src="../L2/L2_VertNav.cgi">
  </frameset>
  <frame name="MainBody" src="../L2/L2_MainBody.cgi">
</frameset></html>
[jeeves: 3:]

what is important to remember is that the 'src' need to be set relative to where the URL is set, NOT where it would be in the file system.

A part of the reason that I have the generic function listed at
the end is that I expect to pass certain query strings on through
the index.cgi code such as:

[jeeves: 4:] GET "http://xanana/HqAdmin/L2/?verb=go";

<html><head><title>Level Two Of the Hq Admin Tool</title></head>
<frameset border="0" cols="135,*" frameborder="no" framespacing="0">
<frameset border="0" rows="97,*" frameborder="no" framespacing="0">
<frame name="HqIcon" scrolling="no" src="../html/icon.html">
<frame name="VertNav" src="../L2/ L2_VertNav.cgi?verb=go&config_host=UnkConfigHost&sysname=UnkSysname">
</frameset>
<frame name="MainBody" src="../L2/ L2_MainBody.cgi?verb=go&config_host=UnkConfigHost&sysname=UnkSysname">
</frameset></html>
[jeeves: 5:]


the function I have cached in a perl module is:


sub v_Frame_Page($$$$$) { my ($qString, $title, $src1, $src2, $icon) = @_; if ( $qString) { $src1 .= "?$qString"; $src2 .= "?$qString"; }

        my $p = "$DOC_TYPE \n" .
                '<html><head><title>' . $title . '</title></head>' . "\n" .
                '<frameset border="0" cols="' . $COL_SIZE .
                        ',*" frameborder="no" framespacing="0">'. "\n" .
                '  <frameset border="0" rows="' . $ROW_SIZE .
                                ',*" frameborder="no" framespacing="0">' . "\n" .
                '    <frame name="HqIcon" scrolling="no" src="' .
                                $icon . '">' . "\n" .
                '    <frame name="VertNav" src="' . $src1 . '">' . "\n" .
                '  </frameset>' . "\n" .
                '  <frame name="MainBody" src="' . $src2 . '">' . "\n" .
                '</frameset></html>' . "\n" ;

\$p;

} # end of v_Frame_Page


ciao drieux

---


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



Reply via email to