[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 459
  • Last Modified:

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

0
Corinne_09
Asked:
Corinne_09
1 Solution
 
alien109Commented:
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now