开发者

Picnik-like Signup Form with Realtime Validation (AS2/AS3)

I'm looking to get some advice;

I'm about to build an OOP signup form in AS2 with realtime data validation. There are 3 fields 'Username', 'Password' and 'Email' and two of those will check with the server to see if the the username or email is taken. This is almost identical to the signup form on Picnik.com

The way I've experimented with so far is to begin an onEnterFrame event on the textField as it receives focus. This onEnterFrame function checks for spelling, character count etc

When the textField loses focus it then sends the data to the server and checks if it already exists. If it doesn't, it will validate.

What I've written works rather well (up until the submitting - haven't worked that out yet) but the code is rather unwieldy and seems too long.

MY QUESTIONS:

    开发者_C百科
  1. What is the best way to go about building this?

  2. Are onEnterFrame checkers the best way to go?

  3. Should the data send to the server onKillFocus?

  4. Should the submit button trigger all the onEnterFrame validation functions to run again (in case the user didn't wait for validation)

  5. Would you suggest building it a better way?

AS3 tips welcome - I'm only using AS2 for the moment as its for a client who requests it

Thanks!


onChanged in AS2 or Event.CHANGE in AS3 may be a better alternative than onEnterFrame for checking TextField input.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜