Web page with frames...

Ask a Question related to PERL Miscellaneous, Design and Development.

  1. #1

    Default Web page with frames...

    I'm trying to create a web page which has 2 frames, left and right.
    In the left frame is a form to enter a number of data elements. In
    the right frame, to start with, is some text with instructions. The
    user is to enter data into the left frame and submit, in which case
    calculations take place, and the results are then displayed in the
    right frame. (The data is to be retained in the left frame in case
    the user wants to make some changes to it, and resubmit.)

    I've got the code written for the left frame. I've got code written to
    do the calculations. Here's the question: when I submit the form, which
    kicks off the CGI script to do the calculations, what do I do (I presume)
    in the CGI script to get it to send the result to the frame on the right?

    I've thought that I could probably have the CGI script create an html
    page, and then put a "Display" button in the left frame to have it
    "target" its output to the right frame. But I was wondering if I could
    do something so that it would send it automatically without the Display
    button.

    Any hints to get me started in the right direction would be appreciated.

    --
    Dave Brown Austin, TX
    Dave Brown Guest

  2. Similar Questions and Discussions

    1. Change all page frames?
      Hi, I have a book with a single main-flow frame on each page. My client wants me to make the text narrower---that is, to make the side margins...
    2. Anchors in Frames lock my page
      Help! I've built a site that lives in a frameset (top and mainFrame). When I navigate to an anchor loaded into the mainFrame and hit 'edit page' it...
    3. Saving a page with frames in it
      I made a site that has frames to try and make it look better but is there any way to save all of it as one page so i can upload the page to a server...
    4. Display scrollbars in Page with frames
      I have two frames one at the top and one at the left of my screen. I have scrollbars in each of those frames but not in the whole page that should...
    5. Frames to open a page in?
      How do you make a frame that you open a html file in, in one single Fireworks document, and not having to add any frames or anything when you finish...
  3. #2

    Default Re: Web page with frames...


    "Dave Brown" <dhbrown@hobbes.dhbrown.net> wrote in message
    news:slrnbih2u1.dcn.dhbrown@hobbes.dhbrown.net...
    >
    > I've got the code written for the left frame. I've got code written to
    > do the calculations. Here's the question: when I submit the form, which
    > kicks off the CGI script to do the calculations, what do I do (I presume)
    > in the CGI script to get it to send the result to the frame on the right?
    >
    You do it all in javascript. Put a "javascript: void 0" on the submit button
    so that the page you don't want to change doesn't, and the then create a
    function to change the other page with data from the first (i.e., get the
    values from your form, create a link to your cgi script including those
    values and then use top.frameiwantochange.location.href to update the page).
    Sometimes its just easier to create an invisible form that mirrors the one
    in the frame you want to display your results in, copy all the current
    values over when the user clicks submit, and then submit that form. I'm sure
    there are other ways, too, but you're going to have to do it all on the
    client side.

    Matt


    mgarrish Guest

  4. #3

    Default Re: Web page with frames...


    <original message snipped for brevity>
    > I've got the code written for the left frame. I've got code written to
    > do the calculations. Here's the question: when I submit the form, which
    > kicks off the CGI script to do the calculations, what do I do (I presume)
    > in the CGI script to get it to send the result to the frame on the right?
    > --
    > Dave Brown Austin, TX
    According to the O'Reilly's HTML- the definitive guide (the Koala book), the
    form tag has a target attribute. Simply add 'target=<right frame>' to the
    form tag to notify the browser that form results should be displayed on the
    right.

    You might also consider dropping the whole framing concept and simply return
    the completed form as part of the CGI output- this would increase
    compatibility and eliminate issues with synchronizing frames and 'back'
    button presses.

    I'm not saying that separate <form> and <output> data is necessarily bad,
    but IMHO managing some data on the client side and some server side is more
    difficult than evaluating (and responding to) all the data as a fresh
    transaction.




    Mark Guest

  5. #4

    Default Re: Web page with frames...

    Dave Brown wrote:
    > [...] web page [...] frames[...] form [...] submit [...]
    > right frame [...] left frame [...] CGI [...] html [...]
    > page [...] button [...]
    None of that has anything to do with Perl whatsoever.
    Do you have any Perl-related question, too?

    jue


    Jürgen Exner Guest

  6. #5

    Default Re: Web page with frames...

    In article <Bj1Wa.15919$cF.7149@rwcrnsc53>, Mark wrote:
    >
    ><original message snipped for brevity>
    >
    >> I've got the code written for the left frame. I've got code written to
    >> do the calculations. Here's the question: when I submit the form, which
    >> kicks off the CGI script to do the calculations, what do I do (I presume)
    >> in the CGI script to get it to send the result to the frame on the right?
    >> --
    >> Dave Brown Austin, TX
    >
    > According to the O'Reilly's HTML- the definitive guide (the Koala book), the
    > form tag has a target attribute. Simply add 'target=<right frame>' to the
    > form tag to notify the browser that form results should be displayed on the
    > right.
    >
    > You might also consider dropping the whole framing concept and simply return
    > the completed form as part of the CGI output- this would increase
    > compatibility and eliminate issues with synchronizing frames and 'back'
    > button presses.
    >
    > I'm not saying that separate <form> and <output> data is necessarily bad,
    > but IMHO managing some data on the client side and some server side is more
    > difficult than evaluating (and responding to) all the data as a fresh
    > transaction.
    I tried the "target" tag, and it worked. As I posted in other followup,
    the data is lost. So I've been coming to the same conclusion as you
    recommend... regenerate the form as part of the CGI output.

    Or I'm thinking of storing the data in a cookie... (As you can tell, I'm a
    novice at CGI programming.)

    --
    Dave Brown Austin, TX
    Dave Brown Guest

  7. #6

    Default Re: Web page with frames...

    Dave Brown <dhbrown@hobbes.dhbrown.net> writes:
    > Caught by the topic police. (It has to do with CGI programming
    > which I happen to be doing in perl.)
    Yes, people do a lot of things with Perl; that doesn't make questions
    about them Perl questions. I'm writing a library-cataloguing system
    in Perl right now; does that make comp.lang.perl.misc a good place to
    ask if I should use Library of Congress or Dewey-Decimal indexing?
    (In the short term, probably LoC, only because I can easily query
    their database using Net::Z3950, but I'd like to offer both.)
    > Perhaps you could recommend
    > a relevant newsgroup for CGI programming?
    comp.infosystems.[url]www.authoring.cgi[/url]
    > BTW, the target tag worked, though I couldn't find it in my old
    > O'Reilly HTML book.
    That's why you should always look at authoritative sources before
    posting to newsgroups. Books are useful for quick references, but are
    too often incomplete or out-of-date. Perl has online documentation
    available by 'perldoc'; the W3C has online HTML references available.
    > But whereas the data entered remains in the left frame, the form
    > doesn't "save" it. So I can't simply change one value and "submit".
    > Do I need to use a cookie?
    I'm sorry, I have no idea what you're trying to say here. You'd best
    ask again on ciwac; they may have a better chance at interpreting your
    meaning.

    -=Eric
    --
    Come to think of it, there are already a million monkeys on a million
    typewriters, and Usenet is NOTHING like Shakespeare.
    -- Blair Houghton.
    Eric Schwartz Guest

  8. #7

    Default Re: Web page with frames...

    On Thu, 31 Jul 2003 16:48:39 +0000, Dave Brown wrote:
    > Caught by the topic police. (It has to do with CGI programming
    > which I happen to be doing in perl.) Perhaps you could recommend
    > a relevant newsgroup for CGI programming?
    perhaps:
    comp.infosystems.[url]www.authoring.cgi[/url] or
    comp.infosystems.[url]www.authoring.html[/url] or
    comp.infosystems.[url]www.authoring.site-design[/url] or even possibly
    comp.lang.javascript

    unless, of course, there is some perl code we can all look at (and help
    with).

    --
    Todd de Gruyl

    Todd de Gruyl Guest

  9. #8

    Default Re: Web page with frames...

    On Thu, Jul 31, Dave Brown inscribed on the eternal scroll:
    > Caught by the topic police.
    If you, like me, need lots of fresh coffee for programming, it would
    be natural to ask one's Perl questions on rec.food.drink.coffee,
    right?
    > (It has to do with CGI programming which I happen to be doing in
    > perl.)
    Did you get the point yet?
    > Perhaps you could recommend a relevant newsgroup for CGI
    > programming?
    If it's a question _about_ CGI programming, then naturally, just as it
    says in perlfaq9 - comp.infosystems.[url]www.authoring.cgi[/url], (read its
    posting instructions first - beware of the autobot...)

    But if it's a problem with the HTML that you're trying to generate
    from your CGI process, then they're likely to send you off for a basic
    course in HTML before they'd be happy to let you loose on server-side
    scripting.
    > BTW, the target tag worked, though I couldn't find it in my old
    > O'Reilly HTML book.
    You really need to find the authoritative specifications for the
    various technologies involved in what you're doing. No point in
    writing a program to do some task until you've understood basically
    what that task is (to be frank.)

    good luck

    --
    "This is not rocket surgery" - Stan Brown
    Alan J. Flavell Guest

  10. #9

    Default Re: Web page with frames...


    "Eric Schwartz" <emschwar@ldl.fc.hp.com> wrote in message
    news:eton0eua93o.fsf@wormtongue.emschwar...
    >
    > Yes, people do a lot of things with Perl; that doesn't make questions
    > about them Perl questions. I'm writing a library-cataloguing system
    > in Perl right now; does that make comp.lang.perl.misc a good place to
    > ask if I should use Library of Congress or Dewey-Decimal indexing?
    > (In the short term, probably LoC, only because I can easily query
    > their database using Net::Z3950, but I'd like to offer both.)
    >
    And a lot of people offer that same incredibly trite answer, which is
    equally pointless. For one, the offenders obviously don't know where they
    should be posting, so being a prick does nothing but make yourself look like
    a moron. Second, it's not going to change anything; the people who post
    off-topic questions are usually the ones who have never looked for the
    answer. And finally, it does nothing to help the poster find his way to
    where he should be posting. (And I'm referring more to the resident jackass
    in this group who posted the earlier reply.) If you don't like off-topic
    posts, stick to a moderated group...

    Matt
    (who eagerly awaits the day someone creates a way to send an e-slap)


    mgarrish Guest

  11. #10

    Default Re: Web page with frames...


    "mgarrish" <mgarrish@rogers.com> wrote in message
    news:bziWa.34192$hOa.28630@news02.bloor.is.net.cab le.rogers.com...
    >
    > "Eric Schwartz" <emschwar@ldl.fc.hp.com> wrote in message
    > news:eton0eua93o.fsf@wormtongue.emschwar...
    > >
    > > Yes, people do a lot of things with Perl; that doesn't make questions
    > > about them Perl questions. I'm writing a library-cataloguing system
    > > in Perl right now; does that make comp.lang.perl.misc a good place to
    > > ask if I should use Library of Congress or Dewey-Decimal indexing?
    > > (In the short term, probably LoC, only because I can easily query
    > > their database using Net::Z3950, but I'd like to offer both.)
    > >
    >
    > And a lot of people offer that same incredibly trite answer, which is
    > equally pointless. For one, the offenders obviously don't know where they
    > should be posting, so being a prick does nothing but make yourself look
    like
    > a moron. Second, it's not going to change anything; the people who post
    > off-topic questions are usually the ones who have never looked for the
    > answer. And finally, it does nothing to help the poster find his way to
    > where he should be posting. (And I'm referring more to the resident
    jackass
    > in this group who posted the earlier reply.) If you don't like off-topic
    > posts, stick to a moderated group...
    >
    > Matt
    > (who eagerly awaits the day someone creates a way to send an e-slap)
    The one thing you are forgetting are all the Usenet archives like Google
    Groups. Having the so called "trite answers" at least helps some newbies in
    the future how have the common decency to search before they post.


    Tintin Guest

  12. #11

    Default Re: Web page with frames...


    "Tintin" <me@privacy.net> wrote in message
    news:bgdhvn$mh84m$1@ID-172104.news.uni-berlin.de...
    >
    > The one thing you are forgetting are all the Usenet archives like Google
    > Groups. Having the so called "trite answers" at least helps some newbies
    in
    > the future how have the common decency to search before they post.
    >
    I'd like to hear your explanation of what good Jurgen's answer does anyone
    (newbie or not). Someone posting an off-topic question isn't an invitation
    to show what a jerk you can be. Either don't answer at all, or show a little
    civility and point the person in the right direction. It shows more
    character to help someone than to write a post that just strokes your own
    ego.

    Matt


    mgarrish Guest

  13. #12

    Default Re: Web page with frames...

    "mgarrish" <mgarrish@rogers.com> writes:
    > I'd like to hear your explanation of what good Jurgen's answer does anyone
    > (newbie or not).
    It tells them their question is not a Perl question. It also tells
    them that non-Perl-related questions aren't welcome here.
    > Someone posting an off-topic question isn't an invitation
    > to show what a jerk you can be. Either don't answer at all, or show
    > a little civility and point the person in the right direction. It
    > shows more character to help someone than to write a post that just
    > strokes your own ego.
    Go for it. Nobody's stopping you.

    -=Eric
    --
    Come to think of it, there are already a million monkeys on a million
    typewriters, and Usenet is NOTHING like Shakespeare.
    -- Blair Houghton.
    Eric Schwartz Guest

  14. #13

    Default Re: Web page with frames...


    "Eric Schwartz" <emschwar@ldl.fc.hp.com> wrote in message
    news:eto65lh6plk.fsf@wormtongue.emschwar...
    > "mgarrish" <mgarrish@rogers.com> writes:
    >
    > It tells them their question is not a Perl question. It also tells
    > them that non-Perl-related questions aren't welcome here.
    >
    It's a pathetic attempt to garner attention for one's self. It neither
    addresses the problem (that the user didn't know where to post), nor does it
    do anything but provoke the poster into a flame war. He wasn't asking anyone
    to do his work for him. He wasn't rude, either. He just "thought" he was
    asking a Perl question. Hardly justification for such a stupid response.

    Matt


    mgarrish Guest

  15. #14

    Default Re: Web page with frames...

    "mgarrish" <mgarrish@rogers.com> writes:
    > It's a pathetic attempt to garner attention for one's self.
    You're wrong.
    > Hardly justification for such a stupid response.
    Tell ya what. You stick around here for oh, 5 years or so, answering
    the same exact set of questions several times a day, politely and
    cheerfully, for free, and then maybe you'll be qualified to tell us
    why we act the way we do.

    Or you could just pop on, insult a number of people who have been
    writing Perl years before you ever heard of it, and feel morally
    superior.

    Ya know, whatever makes you happy, really.

    -=Eric
    --
    Come to think of it, there are already a million monkeys on a million
    typewriters, and Usenet is NOTHING like Shakespeare.
    -- Blair Houghton.
    Eric Schwartz Guest

  16. #15

    Default Re: Web page with frames...


    "Eric Schwartz" <emschwar@ldl.fc.hp.com> wrote in message
    news:eton0et57s7.fsf@wormtongue.emschwar...
    >
    > Or you could just pop on, insult a number of people who have been
    > writing Perl years before you ever heard of it, and feel morally
    > superior.
    >
    Ooh, I feel insulted...

    Nope, it just a little indigestion. Must be all the tripe.

    Matt


    mgarrish Guest

  17. #16

    Default Re: Web page with frames...


    "Michael Budash" <mbudash@sonic.net> wrote in message
    news:mbudash-F2ED8F.22174901082003@typhoon.sonic.net...
    >
    > nope, must be the tripe all over your face, you ingrate. there goes your
    > last chance of EVER getting any useful advice from this group.
    >
    > *plonk*
    God bless newbies...

    Matt


    mgarrish Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139