Jump to content

Strange behavior with IE/SQL/PHP


bwcc

Recommended Posts

I am having an issue recently with IE (v7.0.5730.11) displaying more than 500 records from an SQL query.  The browser seems to constantly execute - displaying and rehiding records (and the vertical scrollbar grows and shrinks).  I have let the page go for about 5 minutes and it will continue this behavior until a user clicks on the webpage a second time.

 

I've tried connecting to multiple databases, different webservers, different computers. 

 

Here's the code (stripped down version)

 

<?
$server="someserver";
$username="someuser";
$password="somepwd";
$sqlconnect=mssql_connect($server, $username, $password);
$sqldb=mssql_select_db("sometable",$sqlconnect);
?>
<html>
<head>
  <title>Parking Control : Reports</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <link href="lpac.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?
$rep=mssql_query("SELECT TOP 1500 account FROM entries");
?>
<div>
  <span class="title" style="width:70px;"><a href="reports_print.php?o=1&<?=''.$v.''; ?>" title="Sort by Ticket #">Ticket#</a></span>
  <span class="title" style="width:75px;"><a href="reports_print.php?o=2&<?=''.$v.''; ?>" title="Sort by Date">Date</a></span>
  <span class="title" style="width:65px;"><a href="reports_print.php?o=3&<?=''.$v.''; ?>" title="Sort by Paid or Void">Paid/Void</a></span>
</div>
<div>
<?
for($i=0; $i<1500; $i++) {
	$row = mssql_fetch_array($rep);
	echo '
	<div style="clear:both;">
	<span class="data" style="width:70px;">'.$row['account'].'</span>
	</div>';
} // end while
?>
</div>
</body>
</html>

 

I've also changed the for statement to a while statement.  Same results.

Firefox seems to execute the code normally, as IE used to.  Any ideas to this strange behavior?

Link to comment
Share on other sites

I did figure out that it is something related to the css style of float:left;

 

The original code above uses a style sheet that sets the data class as 'float:left;'

 

Once I remove that (or the css link), it works fine. But to why?????

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.