Page 1 of 1

php or ajax problem

Posted: Tue Sep 28, 2010 1:19 pm
by haverer
Hi guys,
first post... I hope I've got this in the right place!

I've a page that works perfectly in firefox but in internet explorer it only works IF I refresh the page before submitting the form!!!!!!!
Any ideas, as this is a new one on me!!!

I've posted the index page below.
would be greatful for any points! thanks in advance!

<html>
<head>
<title>Tables Overview</title>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>



<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>






<body>

<div id="container" style="border:1px solid black; margin:10px; text-align:center; padding:5px; background:lightblue; font-family: 'Comic Sans MS', cursive;">Record Will Be Displayed Here!</div>



<select name="tclasss" id="tclasss">
<option>---Please Select---</option>
<option value="WALN"> Walnut</option>
<option value="SYC">Sycamore</option>
<option value="OAK">Oak</option>
<option value="WATT">Wattle</option>
<option value="POP">Poplar</option>
<option value="JOSH">Joshua</option>
<option value="MAG">Magnolia</option>
<option value="WILL">Willow</option>
<option value="MAPL">Maple</option>
<option value="PINE">Pine</option>
<option value="SILV">Silver Birch</option>
</select>
<input type="submit" value="Display Class Record" onClick="doAjax();" />




<script type="text/javascript">
function doAjax()
{
$.ajax(
{
type: "POST",
url: "ajax.php",
data: (
{
"type": "show",
"classs": $("#tclasss").val()

}),
success: function(response)
{
$("#container").html(response);
}
});
}


function tablesUpdate(id, valuee)
{
$.ajax(
{
type: "POST",
url: "ajax.php",
data: (
{
"id": id, "valuee": valuee, "type": "update", "classs": $("#classs").val()
}),
success: function(response)
{
$("#container").html(response);
}
});
}
</script>



</body>
</html>