Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2009
    Thanked 0 Times in 0 Posts

    Add and Remove text box as in JavaScript

    Hi, I am having a problem in adding and removing the the email field text boxes dynamically. I have an add button beside an email field. On clicking it a new email field is generated below it dynamically with a remove button beside it(this too dynamically).
    The problem is if I have added 5 email fields and I want to, say remove the third email field, then i have to reset the 'y' position of the subsequent email field text box; i.e; I have to reset the 'y' position of 4th and 5th email fields.
    This problem becomes serious if I have 10 instead of 5 email fields.
    I have learn that in Javascript we can do this use of a container that automatically resets the position of the text fields. Is there any way out in Flash for this?
    Any help is appreciated.

  2. #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Thanked 238 Times in 229 Posts
    Yes it is possible.


    You'd have to construct a function that keeps track of the number and adjusts them accordingly, but there is plenty of functionality in AS to make it happen. However in the end, they'll both be pretty similar so you'd have to decide which you'd like.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts