I am using JavaScript and jQuery. My main file has My.js and Ajax.
My.js
function build_one(){
alert("inside build_one");
}
My main file
<script type="text/javascript">
..
// Here I want to make call function defined in My.js build_one()
..
// Here is the Ajax call
$.ajax({
type:'POST',
url: 'ajax.php',
data:'id='+id ,
success: function(data){
$("#response").html(data);
}
});
...
</script>
How do I make the build_one() function call before the Ajax function?