I really hated that javascript answer above (bs answer imho).

This is more of an html question than a CGI one

While I have no clue what your frame structure looks like, here's some advice:

//index.pl frame1 = foo1.pl frame2 = foo2.pl frame3 = foo3.pl
there's a form on frame1, and you want it to update frame1 frame2 and frame3 when it's submitted

the solution, specify target=_top

If you wish to update only 2 of the 3 available frames, the answer is the same, specify target=_top and update the entire frameset (if it's all in one frameset).

If you have 2 framesets, frameset1 which has frame1, and frameset2, which has frame2 and frame3, and you wish to update only frames 2 and 3, then just update frameset2, and frame1 can remain without changing.

I also sugguest you specify an expiration date for each of the pages, so people can take advantage of caching (this prolly means a the same get string)

If you have no idea what i'm talking about, form target

Now for the perl part

#!/usr/bin/perl -wT #index.pl use CGI qw/ :all /; my $fs = param("fs") || 0; # frameset my $fr = param("fr") || 0; # frame ## only numbers are acceptable $fs =~ s/\D//g; $fr =~ s/\D//g; $fs ||= 0; # if they weren't defined, or were gibberish $fr ||= 0; # they best be 0 $|=1; # unbuffer print header(-type => 'text/html', # cache only for five minutes -expires => '+5m' ), # you clients that cache if($fs == 1) { &generate_frameset1(); } elsif($fs ==2) { if($fr == 2) { &generate_frame2(); } elsif($fr == 3) { &generate_frame3() } else { &generate_frameset1(); } } else { &generate_frameset_all(); } ### ... the actual subroutines below ### index.pl writes something like <frameset 1> <frame src ="index.pl?fs=1;fr=1;"> <frameset 2> <frame src ="index.pl?fs=2;fr=3;"> <frame src ="index.pl?fs=2;fr=3;"> </frameset> </frameset>
I think this is plenty to get you started, lemme if it helps out (and what you settle on).

Do remember, javascript is a client-side. paranoia, paranoia, paranoia...

 
___crazyinsomniac_______________________________________
Disclaimer: Don't blame. It came from inside the void

perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"


In reply to (crazyinsomniac) Re: Hierarchical HTML frame processing (somewhat OT) by crazyinsomniac
in thread Hierarchical HTML frame processing (somewhat OT) by mikeB

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.