in reply to How to get those CGIs running in a frame.

you should consider a dispatch-table/-hash to do the dirty work done via if-statements: (the seclev stuff is only there to show some further benefits beneath readabilty-enhancement :)

my $apps = { help => { app => '/main.html', seclev => 0, }, staff => { app => '/cgi-bin/staff' seclevel => 0, }, adm_staff => { app => '/db/staff/selstad.pl', seclevel => 10, }, birthday => { app => '/db/staff/birthday.pl', seclevel => 10, }, jubilee => { app => '/db/staff/firmenjub.pl', seclevel => 10, }, location => { app => '/db/staff/location.pl', seclevel => 10, }, }; my $app = $q->param('app'); $app = 'help' unless exists($apps->{$app}); my $application_to_call = $apps->{$app}{app};

regards,
tomte


Hlade's Law:

If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.

Replies are listed 'Best First'.
Re: Re: How to get those CGIs running in a frame.
by neniro (Priest) on Apr 08, 2004 at 16:44 UTC
    That's a nice idea.
    Thank you!

      That's a nice idea.
      Thank you!

      not mine ;-), I like to hand on your thanks to all the it-professionals sharing knowlegde and code in free spirit, leaving it for us to find...

      I leave out more sentimental sermon-like stuff;

      your most welcome :D

      regards,
      tomte


      Hlade's Law:

      If you have a difficult task, give it to a lazy person --
      they will find an easier way to do it.