Reputation: 1113
Why alert("Test1") is executed, while alert("Test2") is not executed?
P.S. Currently I'm not using json data
.
<script>
$(document).ready(function() {
var param = 10;
$.getJSON(
'modules/mod_scheduler/updateList.php?param'+param,
function(data)
{
alert("Test1");
find_optimal_schedule();
}
);
});
</script>
<script language="javascript">
function find_optimal_schedule() {
alert("Test2");
//...
}
</script>
Upvotes: 0
Views: 89
Reputation: 7562
I'm not sure about it, but try changing this bit:
<script language="javascript">
into:
<script type="text/javascript">
And see if it runs.
Upvotes: 2