By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,178 Members | 987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,178 IT Pros & Developers. It's quick & easy.

How to solve my problem in the Internet Explorer ?

100+
P: 147
Hi,

I am listing out the students from the database,its nearly 100 in numbers.I am getting the OUTPUT correctly in MOZILLA FIREFOX as 100 in numbers.

But,i am facing the problem in INTERNET EXPLORER.Its listing only 50 in numbers.Remaining 50 numbers,its not listing.

I am using PERL PROGRAM and SQL SERVER 2000.I want the OUTPUT as same in INTERNET EXPLORER as well as MOZILLA FIREFOX.

Please give me a solution and Thanks in advance
Jul 15 '10 #1

✓ answered by RonB

First problem is that you're missing these 2 lines, which should be in every Perl script you write.
Expand|Select|Wrap|Line Numbers
  1. use warnings;
  2. use strict;
When testing/debugging cgi scripts add this module to redirect errors to the browser
Expand|Select|Wrap|Line Numbers
  1. use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
and add this just after the Content-Type header, which redirects the warnings to the browser.
Expand|Select|Wrap|Line Numbers
  1. warningsToBrowser(1);
Next problem is that you have 2 opening body tags. Remove one of them. You also have the same problem with the table tags.

Share this Question
Share on Google+
5 Replies


Expert Mod 100+
P: 589
It's impossible to troubleshoot code that you haven't shown.
Jul 15 '10 #2

P: 15
Try breaking the program up into sql, then Perl, then cgi. The sql and Perl shouldn't care which browser and should both retunr your 100 rows. Then check into how you are displaying these 100 rows in both browsers. You can google what works in ff and not in ie. Or post your code and setup since this is multi-layered.
Jul 15 '10 #3

100+
P: 147
@RonB
hi,
Please see my coding......Thanks for your response


Expand|Select|Wrap|Line Numbers
  1. #!c:/perl/bin/perl
  2. use CGI qw(:all);
  3.  
  4. $pfaccode = param('faccode');
  5. print "Content-type: text/html\n\n";
  6. print "<html>";
  7. print "<body>";
  8. print "<table align=center border=0>";
  9. #print "<body bgcolor=#ffcccc onload=document.issue.rollno.select();>";
  10. print "<body bgcolor=#ffcccc>";
  11.  
  12. use DBI;
  13. my $dbh = DBI->connect("DBI:ODBC:wwwdsn","webid","dibew") or die "Cant connect: $DBI::errstr\n";
  14. #print "<form method=post action=/cgi-bin/oregn/studgrades1.cgi name=issue>";
  15. #print "<form method=post action=/cgi-bin/oregn/gradecard.cgi name=issue>";
  16.  
  17. $j=0;
  18. print "<br>";
  19. print "<center><h2><u>Student Grades</u></h2></center>";
  20. print "<br>";
  21.  
  22. #Changes Made on 5th July by sanlak
  23. print "<center><table border=1 align=center></center>";
  24.  
  25. print "<tr><th>SlNo<th>Rollno<th>Name<th>Programme<th>Deptcode<th>Brancode<th>Semester<th>View</tr>";
  26. $sth=$dbh->prepare("select rollno,name,programme,deptcode,brancode,semester from stuacmst where faccode=? and studstat in ('C','F') order by rollno")or die "Cant prepare: $DBI::errstr\n";
  27. $sth->execute($pfaccode) or die "Cant execute: $DBI::errstr\n";
  28. while(@row = $sth->fetchrow_array())
  29. {
  30.      $prollno=$row[0];
  31.      $pname=$row[1];
  32.      $pprogramme=$row[2];
  33.      $pdeptcode=$row[3];
  34.      $pbrancode=$row[4];
  35.      $psemester=$row[5];
  36.  
  37.      $j=$j+1;
  38.      print "<tr><td>$j</td><td>$row[0]</td><td>$row[1]</td><td>$row[2]</td><td>$row[3]</td><td>$row[4]</td><td>$row[5]</td>";
  39.      if(($pprogramme eq 'B') || ($pprogramme eq 'L'))
  40.      {
  41.      print "<form method=post action=/cgi-bin/oregn/gradecard.cgi name=issue >";
  42.      print "<input type=hidden name=rollno value=$prollno>";
  43.      print "<input type=hidden name=faccode value=$pfaccode>";
  44.      print "<td><input type=submit value=\"View\"></td>";  
  45.      print "</form>";
  46.      print "</tr>";
  47.      }
  48.  
  49.  
  50.     if($pprogramme eq 'M')
  51.      {
  52.      print "<form method=post action=/cgi-bin/oregn/mtechgradecard.cgi name=issue >";
  53.      print "<input type=hidden name=rollno value=$prollno>";
  54.      print "<input type=hidden name=faccode value=$pfaccode>";
  55.      print "<td><input type=submit value=\"View\"></td>";  
  56.      print "</form>";
  57.      print "</tr>";
  58.      }
  59.  
  60.  
  61. }
  62. print "</table>";
  63. print "</body>";
  64. print "</html>";
  65.  
  66.  
please sort out my problem.....i need my program is to run on IE also .
Jul 16 '10 #4

Expert Mod 100+
P: 589
First problem is that you're missing these 2 lines, which should be in every Perl script you write.
Expand|Select|Wrap|Line Numbers
  1. use warnings;
  2. use strict;
When testing/debugging cgi scripts add this module to redirect errors to the browser
Expand|Select|Wrap|Line Numbers
  1. use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
and add this just after the Content-Type header, which redirects the warnings to the browser.
Expand|Select|Wrap|Line Numbers
  1. warningsToBrowser(1);
Next problem is that you have 2 opening body tags. Remove one of them. You also have the same problem with the table tags.
Jul 16 '10 #5

100+
P: 147
@RonB
hi,

Thanks for your information.I just removed my <body> tag as you told.I got the output in the Internet Explorer.
Jul 19 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.