Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

CGI script not working properly with Internet Explorer

by tarunkhanna (Novice)
on Oct 10, 2011 at 09:57 UTC ( #930569=perlquestion: print w/replies, xml ) Need Help??
tarunkhanna has asked for the wisdom of the Perl Monks concerning the following question:

Hi

My CGI script working properly in chrome. But not working properly with Internet Explorer.

eg. The button I am creating like
print $co->image_button(-name=>'dir',-value=>'test',-src=>'../../../ic +ons/dir.gif',-onclick=>"parent.location.href=\'first.cgi\'");
My code first.cgi is like:-
if ($co->param('dir')) { ####If condition } else { print $co->image_button(-name=>'dir',-value=>'test',-src=>'../../../ic +ons/dir.gif',-onclick=>"parent.location.href=\'first.cgi\'"); ####Else condition }
If I run this script for the first time, else part should run. When I click the above button, this script with if part should run which is happening properly in google chrome.

But, when I run the above script with internet explorer (version 8.0.7600.16385), above script always runs with else part even after clicking the button.

Replies are listed 'Best First'.
Re: CGI script not working properly with Internet Explorer
by marto (Bishop) on Oct 10, 2011 at 10:27 UTC
Re: CGI script not working properly with Internet Explorer
by Anonymous Monk on Oct 10, 2011 at 10:18 UTC

      Still not perl related, still no attempts at debugging, but worse, this time no complete program

Re: CGI script not working properly with Internet Explorer
by Anonymous Monk on Oct 10, 2011 at 18:48 UTC

    You really should stop using javascript (yes, that includes onclick) and use regular links (print $co->a(-href => "first.cgi?dir=test"). Furthermore, please review the HTML that is generated -- it is much easier to debug. In fact, I don't even recommend using CGI to generate HTML tags.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://930569]
Approved by Gangabass
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2017-03-29 15:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (351 votes). Check out past polls.