Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Debug question

Reply
Thread Tools

Debug question

 
 
JoeyP
Guest
Posts: n/a
 
      12-29-2006
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.

 
Reply With Quote
 
 
 
 
Paul Lalli
Guest
Posts: n/a
 
      12-29-2006
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

 
Reply With Quote
 
 
 
 
JoeyP
Guest
Posts: n/a
 
      12-29-2006

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
netvmini.sys still not working on Windows 7 even after driver signing disabled ?! (Windows debug mode necessary for debug drivers ???) Skybuck Flying Windows 64bit 3 08-09-2009 05:54 AM
debug="false" in web.config and <%@ debug="true" ...%> in aspx file => true or false? André ASP .Net 3 08-28-2006 12:02 PM
Config Mgr Debug/Release and Web.config Compilation debug=true RonL ASP .Net 0 04-08-2006 03:50 PM
Debug (DLL MFC) -> Debug (Static MFC) ringos75 C++ 0 04-14-2005 01:50 PM
[Howto] Compiling debug Python extensions for non-debug Python Mike C. Fletcher Python 3 10-12-2003 09:37 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57