Solved

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

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

707 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