Thread: perl and frames

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    USA
    Posts
    67
    Rep Power
    15
    i would like to use perl to create a "framelike" enviornment where each frame has information which is dynamically allocated from a mysql database, how can i do this?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    108
    Rep Power
    15
    bydavid,

    Could you include some more information? I'm guessing it's more complex than just a framed HTML document, with a PERL script in each frame (to call the database).

    yoshi http://www.datera.com

    [This message has been edited by yoshi (edited April 05, 2000).]
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    USA
    Posts
    67
    Rep Power
    15
    yoshi,

    seriously, that is about as complex as it gets. i guess this is a very easy thing to do, but i odnt know how.

    i want a person to see his info on the top frame (this info is dynaically allocated fomr mysql) and then the bottom frame should show some of his other information (this info is dynaically allocated fomr mysql).
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    108
    Rep Power
    15
    bydavid,

    Do you know how to write frames in HTML? Otherwise, I will consider that you do. You probably want to have a perl script write the HTML frame page, so you can pass values to the induvidual frames easily. Here is an example definition you could probably use (to create frames in perl):

    <FRAMESET ROWS="10%,90%">
    <FRAME SRC="top.cgi?name=$name" NAME="top" SCROLLING=NO framespacing=0 marginheight=0 marginwidth=0 NORESIZE>
    <FRAME SRC="bottom.cgi?name=$name" NAME="bottom">
    </FRAMESET>

    This creates a page with 2 frames: a top (10 percent of the page), and a bottom (90 percent of the page). Instead of 2 pages, 2 scripts are called, passed the variable $name (containing the name), and will find the information (using perl DBI) to print to the screen.

    If you need more information feel free to respond.

    yoshi http://www.datera.com
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    USA
    Posts
    67
    Rep Power
    15
    Thanks Yoshi, I have a direction now. I have only a couple questions regarding the code that you put up.

    I do know frames in html. Is this code going to be printed out by another perl script?
    like this?

    #!/usr/local/bin/perl
    print << frameInfo;
    <FRAMESET ROWS="10%,90%">
    <FRAME SRC="top.cgi?name=$name" NAME="top" SCROLLING=NO framespacing=0 marginheight=0 marginwidth=0 NORESIZE>
    <FRAME SRC="bottom.cgi?name=$name" NAME="bottom">
    </FRAMESET>
    frameInfo

    what would the $name vars be used for?
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    108
    Rep Power
    15
    bydavid,

    I suggest that your first HTML frame page be structured like this. You can print it from a perl script, or have a plain HTML document (that somehow takes in any values you want passed to the frames, like $name):
    <HTML>
    <HEAD>
    <TITLE>A Title</TITLE>
    </HEAD>
    <FRAMESET ROWS="10%,90%">
    <FRAME SRC="top.cgi?name=$name" NAME="top" SCROLLING=NO framespacing=0 marginheight=0 marginwidth=0 NORESIZE>
    <FRAME SRC="bottom.cgi?name=$name" NAME="bottom">
    <NOFRAMES>
    <BODY>
    Viewing this page requires a browser capable of displaying frames.
    </BODY>
    </NOFRAMES>
    </FRAMESET>
    </HTML>

    I created the $name vars because it seemed like you needed a value (like a name) passed to the induvidual frames (so they can display the information - through a SELECT DBI statement).

    I hope this is helpful.
    yoshi http://www.datera.com
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    USA
    Posts
    67
    Rep Power
    15
    Yoshi,

    I see now. Thanks a lot, my frames are working.
    Thanks

IMN logo majestic logo threadwatch logo seochat tools logo