Solved

asynch false not working

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

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

Title # Comments Views Activity
Date on a table 16 33
links not working 2 25
Put POST values into cookies. 14 28
Hta File displays dynamic File names 4 43
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…

685 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