Why does my html page does not run into my javascript block? I add some alert lines and they dooesn't pop-up.. I try to make a ajax get call to load a table with sql data..
EDIT
I added the code to autoload it but that seems not to work.
Here is the code:
<ion-view style="" title="scorebord">
<ion-content class="has-header" overflow-scroll="true" padding="true" style="background: url(img/EYC8SNR0QEuE8C0rKDBQ_menu3.png) no-repeat center;">
<body onload="httpCall2()">
<p>tip</p>
<script type="text/javascript">
function httpCall2() {
alert("datasdsd");
$.ajax({
type: 'GET',
url: 'scorebord_data.php',
contentType: "application/json; charset=utf-8",
data: {data: data},
dataType: "json",
complete: function (data) {
//alert(data);
//alert(JSON.stringify(data));
//alert(data.toString());
//alert(data[1]);
var array = data.responseJSON;
alert(array);
}
})
}
$(document).ready(function httpCall() {
alert("datasdsd");
$.ajax({
type: 'GET',
url: 'scorebord_data.php',
contentType: "application/json; charset=utf-8",
data: {data: data},
dataType: "json",
complete: function (data) {
//alert(data);
//alert(JSON.stringify(data));
//alert(data.toString());
//alert(data[1]);
var array = data.responseJSON;
alert(array);
}
})
})
</script>
<at-pagination at-list="list" at-config="config"></at-pagination>
</body>
</ion-content>
</ion-view>