Solved

asynch false not working

Posted on 2012-03-15
1
224 Views
Last Modified: 2012-03-15
Hi , What am I doing wrong here ?

what is  inside success is returned but outside returns undefined value

 
   	   function getfromto(starts,ends)
   	   {  
   		  var select;     		   
   		   var ft = 
			'from=' + starts + '&to=' + ends; 
   		
		$.ajax({
			 url:'lft.php',					
			 type:'GET',
			 asynch: false,
		     data: ft, 
			  success: function(data)	
			  {		   							  
					select =  data;    							
					  console.log(select);	
					}  
			});
		
		  console.log(select);		
		  return select; 
   	     }

Open in new window

0
Comment
Question by:Rozamunda
1 Comment
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 37727042
remove the << h >>
async: false,

Open in new window

0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

808 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