1) on main page i have javascript function
function editSuccess(data) {
alert(“editSuccess called”);
}
2) From main page I load some content into div using ajax
then i need call javascript function from loaded content
but it’s don’t see editSuccess function
This should work as long as
editSuccessis available in the global scope. Remember that JavaScript has function scope, so if you defineeditSuccessinside a function, it will only be available within that function. Consider this example:will not work since
editSuccessdoes not exist in the global scope.