Solved

asynch false not working

Posted on 2012-03-15
1
222 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
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 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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now