Dear all I am using javascript and jQuery My Mainfile has My.js,and ajax.
My.js has
function build_one(){
alert("inside build_one");
}
My Mainfile has
<script type="text/javascript">
..
// here I want to make call function defined in My.js build_one()
..
// here the ajax call
$.ajax({
type:'POST',
url: 'ajax.php',
data:'id='+id ,
success: function(data){
$("#response").html(data);
}
});
...
</script>
Now My Question is How to make the build_one() function call before the ajax function?.Any suggestion?