Clearing a select list - javascript

Results 1 to 2 of 2

Thread: Clearing a select list - javascript

  1. #1
    Rob Guest

    Default Clearing a select list - javascript

    Is there a javascript command that will clear the contents of a select list?<BR>like document.frm.make.options.clear()<BR>or something?<BR><BR>This is for a dynamic list built of another. If one list is<BR>5 options long and the next one is only 2 options long, the<BR>box remains 5 long. The 2 new and 3 from the last box.<BR><BR>Thanks,<BR><BR>Rob

  2. #2
    Join Date
    Dec 1969

    Default RE: Clearing a select list - javascript

    See and "Dual lists in HTML". It moves select list items from one list to another, removing them from one as it adds them to the other. Works in both MSIE and NS. I wrote it a while back and don&#039t recall the details off the top of my head. <BR><BR>Let me see...oh, yes! I never clear either list completely out because I want to leave in a "dummy" element needed to keep MSIE 4 from collapsing the list width to nothing and needed in the first place to give the list a fixed width for NS. Anyway, look at the code and play with it. <BR><BR>If you have questions, email or<BR>

Posting Permissions

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