white blank displayed on webpage occasionally when changing the select option value

PsyChoses

New Member
I am building an online system where the users are instructors of a certain college institution. One of the main function of the system is for the users to be able to view their schedules via internet.I am currently building the page where the users view their schedule, and what I have done is create a select option in it that triggers a jquery function (that does an ajax request) when the value is changed. The requested page is then displayed on a div in the current page.The problem is, when I try to change the value of a select option, the page occasionally displays a huge white blank on top of my whole page. I don't know what triggers the bug since it only happens occasionally, not every time. When i reload the page, the white space disappears.I have been searching for answers everywhere and did not get one that fits my problem.This is the page before the white space shows uphttps://lh6.googleusercontent.com/-rb0XXjcpn6w/UPiwjIY92OI/AAAAAAAAABo/BmiDIbZWcxU/s640/before.jpgThis is the page when the white space shows uphttps://lh3.googleusercontent.com/-RZxh2P3Bk0o/UPiwRv5oHHI/AAAAAAAAABc/VIB6LYvPBE4/s640/after.jpgI hope you guys can help me out...this is the code of the page..<?phprequire_once("../includes/initialize.php"); $adminEmps = employee::find_by_cond("(department = 'ACADEMIC-TEACHING' or department = 'ACADEMIC-NON TEACHING') and emp_status='active' order by lastname asc");?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Schedule</title></head><script type="text/javascript">function selectEmp(){$('#here').html("<img src=http://stackoverflow.com/questions/Images/gif/loading14.gif' class='three columns centered'>");$.post('viewSched.php','id='+$('#selector').val()+'&yr='+$('#yrselect').val(), function (response){ $('#here').html(response); });}</script><body><?php include("AdminDropdown.php"); ?><div class="row"> <div class="twelve columns"><div class="row panel"> <h2><img src="http://stackoverflow.com/questions/Images/Shedule.png" height="100px" width="100px" style="vertical-align:middle"/> Schedule </h2> <dl class="tabs pill"> <dd class="active"><a href="http://stackoverflow.com/questions/14391468/#simple1">Academic</a></dd> <dd><a href="http://stackoverflow.com/questions/14391468/#simple2">Administrative</a></dd> <dd class="hide-for-small"><a href="http://stackoverflow.com/questions/14391468/#simple3">OSAS</a></dd> </dl> </div> <ul class="tabs-content"><li class="active" id="simple1Tab"><div class="two columns"> Select Employee </div><div class="three columns end"> <select id='selector' onchange="selectEmp()" > <option>--Select--</option> <?php foreach ($adminEmps as $key => $value) { echo "<option value=http://stackoverflow.com/questions/14391468/{$value['emp_ID']}>{$value['lastName']}, {$value['firstName']} {$value['lastName']}</option>"; } ?> </select></div><div class='two columns'></div><div class='two columns' style='text-align:right;'> Select Year</div><div class='three columns end'> <select id='yrselect' onchange="selectEmp()"> <option>-- Select --</option> <?php for ($i=2008; $i <= date('Y'); $i++) { $yr = $i + 1; echo "<option>{$i}-{$yr}</option>"; } ?> </select></div><br><br><div class="twelve columns "> <div class="nine columns centered"> <div id='here'> </div> </div></div></li><li id="simple2Tab"></li><li id="simple3Tab">This is simple tab 3s content.</li></ul> </div></div><?php include("adminfooter.php"); ?></body></html>and this is the code of the requested page.<?phprequire_once('../includes/initialize.php'); $id = $_POST['id']; $yr = $_POST['yr']; $info = sched::find_scheds_by_id_yr($id,$yr); $display = "<table> <thead> <tr> <th>Day</th> <th>Time Start</th> <th>Time End</th> <th>Room</th> <th>Subject</th> </tr> </thead> <tbody> "; if($info){ foreach ($info as $key2 => $value2) { $display .= "<tr> <td>".$value2['day']."</td> <td> ".$value2['time_start']."</td> <td>{$value2['time_end']}</td> <td>{$value2['room']}</td> <td>{$value2['Subject_description']}</td> </tr>"; } } $display.="</tbody> </table>";?><html><head><title></title></head><body> <?php echo $display; ?></body></html>By the way this only happens in google chrome.
 
Back
Top