Drop-down to Input text box

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Drop-down to Input text box

    I am trying to figure out the right way to go about this. I would like to use
    a drop down box as a search component. When you drop down the list, you will
    see the main categories:

    Category 1
    Category 2
    Category 3

    Upon selecting one of those, I would like to have the drop-down box
    automatically change to an input text box the user will enter a search string
    in. This string will query only within the initial category selected. I'll
    have a 'Search Now' button, or the like to initiate the action. Does anyone
    have any ideas for me? Any help is greatly appreciated.

    Regards,

    Chuck Vollmer



    charleuts Guest

  2. Similar Questions and Discussions

    1. White Text Box with Drop Shadow Text on Windows 2000
      I'm new to Indesign, having just got the CS set of software. Used PM 7.0 and Acrobat 5.0 previously. On single page of InDesign, I have reversed...
    2. text input
      im trying to input text into a feild using a keypad arrangment with images as the buttons. problem is everytime i press the next button it...
    3. Input Text, need help
      ok what do i do if say, i have an input box and the user types something. lets say that the box is named 'input', how do i put an action on a button...
    4. Text vs Field for text input
      I know this is a bit of a back-to-basics question, but it is something I have never really got my head around when to use text and when to use...
    5. mouseover drop down text overlaps text on page, unreadable!
      Hello, I would appreciate any suggestions on this problem. When I place my mouse over an area that has a drop down menu, the text overlaps with...
  3. #2

    Default Re: Drop-down to Input text box

    are you looking for help creating a search engine?
    kglad Guest

  4. #3

    Default Re: Drop-down to Input text box

    dropdown box - - use a listbox or combobox component,
    use the component changeHandler to move the dropdown off stage eg _y=1000;
    and using createTextField with type="input" make your input field,

    my 2c's..........hth

    Jack. Guest

  5. #4

    Default Re: Drop-down to Input text box

    Actually, no. We know how we're going to go about querying our database, just
    need to figure out the action to swap the comboBox component for an input text
    field automatically after selecting the item (in the comboBox). Looks like a
    good suggestion below that I'm going to try. If you have any other ideas, I'd
    love to hear em'

    Thanks,

    Chuck



    charleuts Guest

  6. #5

    Default Re: Drop-down to Input text box

    Thanks Jack, sounds like a good idea. I'll give it a try.

    Regards,

    Chuck


    charleuts Guest

  7. #6

    Default Re: Drop-down to Input text box

    I tried this on the comboBox (mfSearch1_cb), but it's not seeing any change
    event...so nothing is happening. Do I need to add a listener first? Or am I
    just missing something silly?

    on (change) {
    my_mc.mfSearch1_cb._y=-3000;
    my_mc.createTextField(mfSearchInput1, 1, 148, 65, 202, 20);
    mfSearchInput1.type = "input";
    }

    Thanks,

    Chuck



    charleuts Guest

  8. #7

    Default Re: Drop-down to Input text box

    i am still using MX, where a typical changeHandler is -

    myCBox.setChangeHandler("handle");

    function handle(component) {
    theURL = component.getSelectedItem().data;
    getURL("http://www."+theURL, "_blank");
    sIndex = component.getSelectedIndex();
    _root.gotoAndStop(sIndex+1);
    };



    Jack. Guest

  9. #8

    Default Re: Drop-down to Input text box

    This is my listener, which is working (on actionscript layer of mc). Using
    this as an example, how would you do the on(change) event for the CB to place
    the clip off the stage?

    myComboBoxListener = new Object();
    myComboBoxListener.change = function(eventObj)
    {
    var eventSource = eventObj.target;
    var theSelectedItem = eventSource.selectedItem;
    var theSelectedItemLabel = theSelectedItem.label;
    trace ( "You selected "+theSelectedItemLabel+".");
    }

    mfSearch1_cb.addEventListener ("change", myComboBoxListener);
    mfSearch2_cb.addEventListener ("change", myComboBoxListener);
    mfSearch3_cb.addEventListener ("change", myComboBoxListener);
    mfSearch4_cb.addEventListener ("change", myComboBoxListener);
    mfSearch5_cb.addEventListener ("change", myComboBoxListener);
    mfSearch6_cb.addEventListener ("change", myComboBoxListener);

    1000 Thanks,

    Chuck


    charleuts Guest

  10. #9

    Default Re: Drop-down to Input text box

    i no longer have, nor find that i need MX2004, as i stated i am staying with MX,
    so i cannot test this code, but at a guess, eventObj is returning the instance
    name
    of the selected component, so i'd try -

    myComboBoxListener.change = function(eventObj){
    eventObj._y = -3000;
    my_mc.createTextField(mfSearchInput1, 1, 148, 65, 202, 20);
    mfSearchInput1.type = "input";
    };

    hth ?


    Jack. Guest

  11. #10

    Default Re: Drop-down to Input text box

    Can't seem to get the change handler right. I'll keep pecking away at it. Thanks for your help!

    Chuck


    charleuts Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139