Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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.

Comment on CGI script not working properly with Internet Explorer
Select or Download Code
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 marto (Chancellor) 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 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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (19)
As of 2014-07-11 16:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (231 votes), past polls