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

    Join Date
    Aug 2000
    Location
    Higher Bebington,Wirral,UK
    Posts
    5
    Rep Power
    0
    Hi,
    I have a web page with 3 frames. One frames has a form with submit button - the target attribute is understood. When the form is submitted, it triggers a perl cgi programme. Depending on various parameters in the form the perl programme has to decide which frame (all 3 have been named) to send the resulting dynamic html info to. How can I set the frame it will go into from the cgi programme? Presumably I need to overwrite what is in the form's target attribute - but how?

    Thanks in advance
    doc
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Start here -> http://www.devshed.com/Talk/Forums/F...ML/000258.html

    Window-target is what you needed.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Higher Bebington,Wirral,UK
    Posts
    5
    Rep Power
    0
    I tried the recommended method with no success. Here is the perl code and the very simple frameset used.
    Perl:
    #! /usr/bin/perl
    use CGI;
    print "Window-target:mybotn";
    print "Content-type:text/htmlnn";
    print "<html>n";
    print "<body>n";
    print "Hellon";
    print "</body>n";
    print "</html>n";
    exit;
    Frameset:
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <frameset rows="243,244">
    <frame src="testtop.htm" name="mytop">
    <frame src="testbot.htm" name="mybot">
    </frameset>
    <noframes><body bgcolor="#FFFFFF">
    </body></noframes>
    </html>
    TopFrame:
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF">
    <form method="post" action="../cgi-bin/test.pl" target="">
    <input type="submit" name="Submit" value="Submit">
    </form>
    </body>
    </html>
    Bottom Frame:
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF">
    </body>
    </html>
    In practice perl will decide after database check which frame to send html code to. What is wrong??
    Thanks, again.


    [This message has been edited by doc (edited August 04, 2000).]
  6. #4
  7. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    You don't need to use "Window-target" for your given example, simply specify the target within your <form> tag should be fine.

    <form method="post" action="../cgi-bin/test.pl" target="mybot">
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Higher Bebington,Wirral,UK
    Posts
    5
    Rep Power
    0
    Thanks for the suggestion but the poin
    t I'm trying to make is that the decision which frame to send the html to has not been made when the form is sent - so setting the target on the form does not help. Info from the form is processed in the cgi programme on the server - this programme then decides which frame the html should go to. Hence the need to change the target for the html from within the cgi programme.
    Cheers
    doc
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>this programme then decides which frame the html should go to

    Then you need "Window-target". Once again, your example doesn't do what you mentioned.
    Okay, start here -> http://home.netscape.com/eng/mozilla...mo/target.html
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Higher Bebington,Wirral,UK
    Posts
    5
    Rep Power
    0
    Hi
    I have now found out that target and window-target (sent from a cgi script) only work with Netscape and not I.E. (I know that it works for both when target is used in a form). So, what I was trying to do cannot be achieved i.e. getting the cgi programme to send HTML to one of two frames while leaving the other unaffected - the choice of frame to be sent the HTML being made by the cgi programme -so the form method is not relevant. It would help if someone could confirm this.

    Thanks
    doc

IMN logo majestic logo threadwatch logo seochat tools logo