Re: CGI and frames

2002-05-14 Thread Todd Wade


"Sven Bentlage" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


  
  


make the src attribute read something like: "path/to/file?section=topFrame"
and "path/to/file?section=mainFrame or whatever.

Then have the cgi program call those subs based on the value of the section
parameter.

Todd W



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




RE: CGI and frames

2002-05-14 Thread David Gray

> I would like to create a html frameset plus the pages for the 
> frameset.

You can't do that in one cgi script unless you call it multiple times
like I showed you.

> Normally a frameset looks (as you all know) somewhat like that:
> 
>framespacing="0">
>  scrolling="NO" noresize >
> 
>   
> 
> Now I do not know/understand, how to replace the 
> src="path/to/file" with 
> the corresponding sub (i.e. sub menu) :(

Use the example I posted which prints a frameset. The frameset uses the
url of the same CGI script which printed out the frameset as the src of
its frames (hence the multiple calls to the same CGI), except it gives
it parameters which tell the CGI to print different content.

I actually meant for you to post some Perl (not just HTML) code...

 -dave



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




Re: CGI and frames

2002-05-14 Thread Sven Bentlage

I would like to create a html frameset plus the pages for the frameset.
In the top frame should go the menu (which is now displayed in a table 
at the top of the page), below that the pages the user creates by 
clicking on the button.

Until now I have not found out how to fill the frameset  with the pages. 
(I know how to create the frameset and the different pages via CGI, but 
do not know how to put it all together)

Normally a frameset looks (as you all know) somewhat like that:


  
  


Now I do not know/understand, how to replace the src="path/to/file" with 
the corresponding sub (i.e. sub menu) :(

Thanks for your help,

Sven
On Wednesday, May 15, 2002, at 12:31 AM, John Brooking wrote:

> Okay, I understand now. I guess you *could* do it with
> "one script", although as someone else noted, it is
> basically separate scripts, called once per page, that
> just happen to be stored in the same file. Whether you
> store it in one script or separate is immaterial,
> IMHO.
>
> So, now that we understand, what exactly is not
> working about it again? :-)
>
> --- Sven Bentlage <[EMAIL PROTECTED]> wrote:
>> Sorry, I chose the wrong words..
>> my script works similar to the way you described
>> below. Depending on
>> which fields are filled out and which button is
>> pressed, a different
>> subroutine is called, creating the page.
>
>
> =
> "When you're following an angel, does it mean you have to throw your 
> body off a building?" - They Might Be Giants, http://www.tmbg.com
> 
> Word of the week: Serendipity, see 
> http://www.bartleby.com/61/93/S0279300.html
>
> __
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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




Re: CGI and frames

2002-05-14 Thread John Brooking

Okay, I understand now. I guess you *could* do it with
"one script", although as someone else noted, it is
basically separate scripts, called once per page, that
just happen to be stored in the same file. Whether you
store it in one script or separate is immaterial,
IMHO.

So, now that we understand, what exactly is not
working about it again? :-)

--- Sven Bentlage <[EMAIL PROTECTED]> wrote:
> Sorry, I chose the wrong words..
> my script works similar to the way you described
> below. Depending on 
> which fields are filled out and which button is
> pressed, a different 
> subroutine is called, creating the page.


=
"When you're following an angel, does it mean you have to throw your body off a 
building?" - They Might Be Giants, http://www.tmbg.com

Word of the week: Serendipity, see http://www.bartleby.com/61/93/S0279300.html

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




RE: CGI and frames

2002-05-14 Thread David Gray

> Sorry, I chose the wrong words..
> my script works similar to the way you described below. Depending on 
> which fields are filled out and which button is pressed, a different 
> subroutine is called, creating the page.

Ok... Could you post some code or pseudocode that describes the problem
you're trying to solve?

 -dave



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




Re: CGI and frames

2002-05-14 Thread Sven Bentlage

Sorry, I chose the wrong words..
my script works similar to the way you described below. Depending on 
which fields are filled out and which button is pressed, a different 
subroutine is called, creating the page.


On Wednesday, May 15, 2002, at 12:01 AM, David Gray wrote:

>> I'm using one CGI script to generate several search pages
>
> That's impossible. One call to a cgi script can generate only one page.
> Consider the following untested  ;) (but simple enough that I probably
> didn't screw it up) code:
>
> --code--
>  #!/usr/bin/perl -w
>  use strict;
>
>  use CGI;
>  my $cgi = new CGI;
>  # this line saves the url of the
>  # currently running CGI script
>  my $me = $cgi->script_name;
>
>  # this is declared as 'our' so
>  # you can use it in your subs
>  # without passing it each time
>  our %F = ();
>
>  # this saves a copy of the form
>  # vars passed to your CGI script
>  # in an easily accessible hash
>  for($cgi->param()) {
>$F{$_} = $cgi->param($_);
>  }
>
>  # this section calls different subs
>  # (which print different HTML)
>  # based on the value of a parameter
>  # passed to the script.
>  # print_frameset() is the default
>  # which gets called if param(page)
>  # isn't defined or is eq ''
>  if(not defined $F{page} or
> $F{page} eq '') {
>print_frameset();
>  } elsif($F{page} eq 'main') {
>print_main();
>  } elsif($F{page} eq 'nav') {
>print_nav();
>  } elsif($F{page} eq 'data') {
>print_data();
>  } else {
>$F{page} =~ s/[^a-z]//g;
>print_error();
>  }
>
>  sub print_frameset {
>print qq^
> example frameset
> 
>   
>   
>   
> 
> ^;
>  }
>
>  sub print_main {
>print qq^This is my MAIN PAGE^;
>  }
>
>  sub print_nav {
>print qq^This is my NAV PAGE^;
>  }
>
>  sub print_data {
>print qq^This is my DATA PAGE^;
>  }
>
>  sub print_error {
>print qq^Unsupported page [$F{page}]
> requested^;
>  }
> --code--
>
> That code generates four html pages (possibly including an error page or
> two), but it gets called four times. Sorry if I'm explaining something
> you already understand, but this is essential.
>
>> (search for
>> people etc) within a secured area.
>> I would like to put the navigation sub into one frame, the retrieved
>> data (sub search1,2...)in another frame.
>> But I do not want to use an  extra script for this.
>
> An adaptation of the above example should work for you.
>
> Good luck,
>
>  -dave
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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




RE: CGI and frames

2002-05-14 Thread David Gray

> I'm using one CGI script to generate several search pages

That's impossible. One call to a cgi script can generate only one page.
Consider the following untested  ;) (but simple enough that I probably
didn't screw it up) code:

--code--
 #!/usr/bin/perl -w
 use strict;

 use CGI;
 my $cgi = new CGI;
 # this line saves the url of the
 # currently running CGI script
 my $me = $cgi->script_name;

 # this is declared as 'our' so
 # you can use it in your subs
 # without passing it each time
 our %F = ();

 # this saves a copy of the form
 # vars passed to your CGI script
 # in an easily accessible hash
 for($cgi->param()) {
   $F{$_} = $cgi->param($_);
 }

 # this section calls different subs
 # (which print different HTML)
 # based on the value of a parameter
 # passed to the script.
 # print_frameset() is the default
 # which gets called if param(page)
 # isn't defined or is eq ''
 if(not defined $F{page} or
$F{page} eq '') {
   print_frameset();
 } elsif($F{page} eq 'main') {
   print_main();
 } elsif($F{page} eq 'nav') {
   print_nav();
 } elsif($F{page} eq 'data') {
   print_data();
 } else {
   $F{page} =~ s/[^a-z]//g;
   print_error();
 }

 sub print_frameset {
   print qq^
example frameset

  
  
  

^;
 }

 sub print_main {
   print qq^This is my MAIN PAGE^;
 }

 sub print_nav {
   print qq^This is my NAV PAGE^;
 }

 sub print_data {
   print qq^This is my DATA PAGE^;
 }

 sub print_error {
   print qq^Unsupported page [$F{page}]
requested^;
 }
--code--

That code generates four html pages (possibly including an error page or
two), but it gets called four times. Sorry if I'm explaining something
you already understand, but this is essential.

> (search for 
> people etc) within a secured area.
> I would like to put the navigation sub into one frame, the retrieved 
> data (sub search1,2...)in another frame.
> But I do not want to use an  extra script for this.

An adaptation of the above example should work for you.

Good luck,

 -dave



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




Re: CGI and frames

2002-05-13 Thread Sven Bentlage

Sorry,here are the details:
I'm using one CGI script to generate several search pages (search for 
people etc) within a secured area.
I would like to put the navigation sub into one frame, the retrieved 
data (sub search1,2...)in another frame.
But I do not want to use an  extra script for this.

Hope this explains it a little bit better..

Sven



On Tuesday, May 14, 2002, at 06:34 AM, John Brooking wrote:

> If you mean can a CGI script output both the frameset
> and all of its pages simultaneously, I don't see how.
> What you can do is have each frame call a CGI script
> for its content, and have another to generate the
> frameset. Each script then outputs its own HTML as
> normal.
>
> If this doesn't address your issue, I think we'll need
> a little more detail.
>
> - John
>
> --- Sven Bentlage <[EMAIL PROTECTED]> wrote:
>> Hi !
>> Right now I'm using a cgi-script to create a few
>> html pages.
>> Somewhere I  read the I also can create framesets
>> plus the dependent
>> html pages via a CGI script.
>>
>> Where can I find a manual on how to do that?  Or can
>> anybody tell me?
>>
>> Thanks for your help.
>>
>> Sven
>>
>>
>> --
>> To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> For additional commands, e-mail:
>> [EMAIL PROTECTED]
>>
>
>
> =
> "When you're following an angel, does it mean you have to throw your 
> body off a building?" - They Might Be Giants, http://www.tmbg.com
> 
> Word of the week: Serendipity, see 
> http://www.bartleby.com/61/93/S0279300.html
>
> __
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


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




Re: CGI and frames

2002-05-13 Thread John Brooking

If you mean can a CGI script output both the frameset
and all of its pages simultaneously, I don't see how.
What you can do is have each frame call a CGI script
for its content, and have another to generate the
frameset. Each script then outputs its own HTML as
normal.

If this doesn't address your issue, I think we'll need
a little more detail.

- John

--- Sven Bentlage <[EMAIL PROTECTED]> wrote:
> Hi !
> Right now I'm using a cgi-script to create a few
> html pages.
> Somewhere I  read the I also can create framesets
> plus the dependent 
> html pages via a CGI script.
> 
> Where can I find a manual on how to do that?  Or can
> anybody tell me?
> 
> Thanks for your help.
> 
> Sven
> 
> 
> -- 
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


=
"When you're following an angel, does it mean you have to throw your body off a 
building?" - They Might Be Giants, http://www.tmbg.com

Word of the week: Serendipity, see http://www.bartleby.com/61/93/S0279300.html

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




CGI and frames

2002-05-13 Thread Sven Bentlage

Hi !
Right now I'm using a cgi-script to create a few html pages.
Somewhere I  read the I also can create framesets plus the dependent 
html pages via a CGI script.

Where can I find a manual on how to do that?  Or can anybody tell me?

Thanks for your help.

Sven


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