Hi, I have the code below and everything works but the button click function on IE I have played around and still cannot seem to get it working.
$(document).ready(function()
{
$("img").hide();
$("#logo").show();
document.getElementById("fname").focus();
$(".button").click(function()
{
postdata();
});
})
function postdata()
{
var parameters = 'fname=' + document.getElementById("fname").value + '&lname=' + document.getElementById("lname").value;
httpxml.onreadystatechange = stateck;
httpxml.open('POST', '../checking/submitcheck.php', true);
httpxml.setRequestHeader('Content-Type', "application/x-www-form-urlencoded");
httpxml.setRequestHeader('Content-Length', parameters.length);
httpxml.send(parameters);
function stateck()
{
if(httpxml.readyState==4)
{
if (httpxml.responseText.indexOf("Successful") >= 0)
{
$("#result").show("slow");
$("#result").html("Project request has successfully been sent");
$("#result").removeClass("result_error");
}
else if (httpxml.responseText.indexOf("Fail") >= 0)
{
$("#result").html("One or more errors have occured, please fix and submit again");
$("#result").addClass("result_error");
$("#result").show("slow");
}
}
}
}
Any idea?
Thanks =)
edit: submit button code
<input type="submit" name="button" class="button" id="button" value="Submit" disabled="disabled" onclick="return false;" />