How can I call my own function inside the AJAX/jQuery $.get() method?

I want to do something like this:
$("#go_button").click(function(){
				 $.get("../RECORDS/GetEmployeeInfo", function(data) {
					 populateEmployeeTable(data); <-----it doesn't recognize this function that I created in a separated .js file
				 });				 
			});

Open in new window

Corinne_09Asked:
Who is Participating?
 
alien109Connect With a Mentor Commented:
As long as the external js file is included before that code executes, and it is defined in the global scope, it should be fine.

Maybe something else?
Wrong path?
Error in some of the other javascript?

Can you provide some source or a link?
0
 
Corinne_09Author Commented:
All my file paths  and references are ok. But I found the error. It was an extra bracket at the end of the js file. Everythings ok now. Thanks.
0
All Courses

From novice to tech pro — start learning today.