Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-05-14
2
Medium Priority
?
458 Views
Last Modified: 2012-05-07
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
Comment
Question by:Corinne_09
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
alien109 earned 2000 total points
ID: 24390308
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
 

Author Closing Comment

by:Corinne_09
ID: 31581708
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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question