tags:

views:

35

answers:

2

Hi, I have a requirement like when I type 2 characters in email field if that email id exists in DB then I need to show remaining emails starting with those characters needs to display in dropdown list. Like Tags part in stackoverflow.com site, Is it possible in flex this functionality? Please suggest me thanks in advance

A: 

Short answer: Yes, you can. Long answer: AJAX means Asynchronous JavaScript and XML but what you want is asynchronous behavior and remote data retrieval. You can easily achieve the asynchronous part in flex by adding an event handler to your input box listening for a change event:

 <mx:Textfield change="changeEventHandler(event)" />

Every time the text in the input field changes this event handler gets called. All you have to do then is talk to a remote server and ask for matching email addresses. And here you really have a lot of options, ranging from "big" solutions like ColdFusion, BlazeDS or GraniteDS to smaller solutions -- you probably want something like this -- like the HTTPService class which lets you connect to HTTP services.

In order to store data, e.g. the user name locally, you can use Flash's SharedObject which behaves pretty much like a cookie. However, it lets you store arbitrary data, so it's way more flexible.

ilikeorangutans
Hi ilikeorangutans Thanks for your suggestion, I have applied like you suggest (using HTTP Service) but it is taking time to load the user names, to increase performance is there any other way to do, I have another option also to do can i use cookie information in flex? Suppose a user logs in and when he logs in again I need to show users name from cookies, is it possible? if is there any possibility please help me Thanks in Advance
praveen
Hey praveen, Why is performance low? How much data are you transferring? Read my updated answer: to store data in a cookie way use the SharedObject class.
ilikeorangutans