Re: value of param

From: sam (sam.wun_at_authtec.com)
Date: 12/29/04

  • Next message: Gunnar Hjalmarsson: "Re: Why does this work?"
    Date: Wed, 29 Dec 2004 22:02:07 +0800
    
    

    sam wrote:

    > Paul Lalli wrote:
    >

    >> An example of your code with the two major errors corrected works
    >> perfectly for me:
    >> #!/usr/bin/perl
    >> use strict;
    >> use warnings;
    >> use CGI;
    >> use CGI::Carp qw/fatalsToBrowser/;
    >> my $query = new CGI;
    >>
    >> print $query->header();
    >>
    >> if (!$query->param) {
    >> print $query->startform(-target=>'_new');
    >> # print "<table border width=100% >\n";
    >> #.....
    >>
    >> print $query->submit(but1);
    >> }
    >> elsif ($query->param(but1)) {
    >> print "param: ", $query->param(but1),"<br>\n";
    >> }
    >>
    >> __END__
    >>
    >>
    > Thanks, it works.
    > Since I m writing a module for webmin. If I include this module in the
    > webmin "enviornment", I will need to include webmin's libaries files
    > which actually makes the value of "but1" goes to somewhere, probably
    > consumed by the webmin header files.
    > The file and function I used in this webmin module are:
    > do '../web-lib.pl';
    > &init_config();
    > &ReadParse();
    >
    > I m thinking how to keep the webmin headings appear while preserved the
    > CGI functionality of my module.
    >
    I just managed to fix the problem by removing the init_config() function
    call in the lib.pl file in my module.

    Sam.

    > Thanks
    > Sam
    >
    >> Please post your actual code, and perhaps someone can help.
    >>
    >> Paul Lalli
    >>
    >>
    >>
    >>> Thanks
    >>> Sam
    >>>
    >>
    >>


  • Next message: Gunnar Hjalmarsson: "Re: Why does this work?"