Remove a number from a list once selected

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Remove a number from a list once selected

    Hi All, I think I have read before that you can remove a number from a list of
    numbers once it has been selected from say a dropdown box. So, if I have a
    list of numbers from 1 to 10. When the user selects 5 from a list.....5 is no
    longer available to be selected until the page has been submited or another
    number has been selected besides 5.

    Thanks in advance.

    EdmondsM Guest

  2. Similar Questions and Discussions

    1. Remove multiple selected items listbox
      How, using asp.net (vb.net), can I remove multiple selected items from a listbox. Everything I try does not seem to work. Thanks in advance.
    2. How do I use what has been selected from a dynamic list?
      I have successfully built a dynamic list from a db table using PHP and MySQL. How do I determine which entries have been selected? I want to write...
    3. dropdown list can't selected.
      I have a EditItemTemplate in a datagrid that contain a dropdown that bound to a dataset. In that grid I have a ItemCreated to handle the dropdow...
    4. Drop down list selected index
      I am populating a drop down list with a privilege levels from a table called "Privilege" with the fields "PrivilegeID" and "PrivilegeName". In a...
    5. how to remove a programe from the add/remove list manually
      i am using winXP home, i just remove a programe from the start menu(start>>all programes>>name of the programe>>uninstall),but the programe name is...
  3. #2

    Default Re: Remove a number from a list once selected

    best bet is to get the
    document.forms[0].fieldname.options[document.forms[0].fieldname].selected
    value, then assign it to a hidden field. then anytime someone changes the
    listbox selection, have it read that value back into a variable, write the new
    selected value into that field, then create a new list item using:

    document.forms[0].fieldname[document.forms[0].fieldname.length+1].text=yourVal;

    document.forms[0].fieldname[document.forms[0].fieldname.length+1].value=yourVal;

    obviously i'm a lazy sod - but basically that's what you need, then since
    you're using numbers, maybe check [url]www.javascriptsource.com[/url] for a script to
    re-sort the list (as the above will add to the end) -> or you can just loop
    through the objects until you find the gap the current insert value belongs in
    and do it that way. Up to you!

    Cheers,
    Aegis

    A3gis 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