Debug question

Discussion in 'Perl Misc' started by JoeyP, Dec 29, 2006.

  1. JoeyP

    JoeyP Guest

    I am accessing a (perl)CGI script from an HTML doc. Something is
    blowing up in the CGI.
    How do I send an 'alert' pop-up message while in the CGI?

    I tried print " alert("Error"); "; but that didn't work.

    I am new to perl.

    Thanks for your help.
    JoeyP, Dec 29, 2006
    #1
    1. Advertising

  2. JoeyP

    Paul Lalli Guest

    JoeyP wrote:
    > I am accessing a (perl)CGI script from an HTML doc. Something is
    > blowing up in the CGI.
    > How do I send an 'alert' pop-up message while in the CGI?


    You don't. If something is "blowing up" in the CGI program, that
    program is not going to correctly create an HTML document that the
    browser can render. It is the browser's own Javascript that would
    process the alert box.

    > I tried print " alert("Error"); "; but that didn't work.


    Not surprising...

    > I am new to perl.


    The problem has nothing to do with Perl and everything to do with CGI.
    You seem to have a fundamental lack of understanding about what a CGI
    program is.

    If your Perl program is malfunctioning, you need to look at the error
    output and see why it's malfunctioning. Either look in the CGI
    server's error log, or put this statement near the top of your program,
    right after 'use CGI;'
    use CGI::Carp qw/fatalsToBrowser/;

    Paul Lalli
    Paul Lalli, Dec 29, 2006
    #2
    1. Advertising

  3. JoeyP

    JoeyP Guest

    Paul Lalli wrote:
    > JoeyP wrote:
    > > I am accessing a (perl)CGI script from an HTML doc. Something is
    > > blowing up in the CGI.
    > > How do I send an 'alert' pop-up message while in the CGI?

    >
    > You don't. If something is "blowing up" in the CGI program, that
    > program is not going to correctly create an HTML document that the
    > browser can render. It is the browser's own Javascript that would
    > process the alert box.
    >
    > > I tried print " alert("Error"); "; but that didn't work.

    >
    > Not surprising...
    >
    > > I am new to perl.

    >
    > The problem has nothing to do with Perl and everything to do with CGI.
    > You seem to have a fundamental lack of understanding about what a CGI
    > program is.
    >
    > If your Perl program is malfunctioning, you need to look at the error
    > output and see why it's malfunctioning. Either look in the CGI
    > server's error log, or put this statement near the top of your program,
    > right after 'use CGI;'
    > use CGI::Carp qw/fatalsToBrowser/;
    >
    > Paul Lalli


    Thanks a bunch Paul.

    use CGI::Carp qw/fatalsToBrowser/; worked.

    Thanks
    JoeyP, Dec 29, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Davef

    Release and debug question

    Davef, Aug 8, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    287
    Davef
    Aug 8, 2003
  2. RonL
    Replies:
    0
    Views:
    730
  3. ringos75
    Replies:
    0
    Views:
    940
    ringos75
    Apr 14, 2005
  4. Mike C. Fletcher
    Replies:
    3
    Views:
    969
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Oct 12, 2003
  5. André
    Replies:
    3
    Views:
    1,562
Loading...

Share This Page