Solved

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

Posted on 2009-05-14
2
455 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 500 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

Suggested Solutions

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

737 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