I got the following javascript code.
And Basically, it works on FF, and IE with developer Tools.
$(function(){
console.log("it is ok");
var mybutton="";
alert("ready1");
$('button[name="delorder"]').click(function(){
console.log($(this).val()+"hay i got a click");
mybutton=$(this).val();
alert("a click1");
$.ajax({
type:'POST',
url:'deleteorderitem.php',
data:mybutton,
success:function(result){
if((result.indexOf("t") < 3) && (result.indexOf("t") >= 0)){
$('#orderresult').html(result);
console.log("i am 3 ");
console.log("index of t is "+result.indexOf("t"));
}else{
console.log("i am 4");
console.log("index of t is "+result.indexOf("t"));
$('#divOrderButton').hide();
$('#orderresult').html("");
$('#divNoinfo').html("There is no record to display at the moment.");
$('#divNoinfo').show();
$('#divOrder').hide();
}
}
});
});
});
</script>
But , it does NOT WORK on IE (without developer tools).
so, any advice will be appreciated.
Thanks
It is mostly because of
Windows IE8 and below has no console object when the Developer tools is not open.
Either comment out the lines that says console. Or create the console object beforehand.
Try this … Not sure if this is the correct way around..
This will create the console object if it is not present.