473,325 Members | 2,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Deselect any selected items in a select form field with multiple attribute?

Hi,

I have two select fields with the multiple attribute so you can see all
options. When a user clicks on one form, I would like to deselect anything
from the other form. Is there a way to do this? eg
document.forms.form.list1.selectedIndex='NULL'; ?

Where can I find out about all options with regards to the DOM?

Thanks,

Keiron
Jul 20 '05 #1
1 8913

"Keiron Waites" <webmaster@-NOSPAM-sharemonkey.com> wrote in message
news:bn**********@hercules.btinternet.com...
Hi,

I have two select fields with the multiple attribute so you can see all
options. When a user clicks on one form, I would like to deselect anything
from the other form. Is there a way to do this? eg
document.forms.form.list1.selectedIndex='NULL'; ?

Where can I find out about all options with regards to the DOM?

Thanks,

Keiron


Ok I've answered my own question:

document.form.list1.selectedIndex='-1';

-1 means that nothing is selected in the select field. I hope this helps
someone.
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Geir Baardsen | last post by:
Hi! From a listbox I'd like to send only selected items to a report. Items will include: OrderNr,Date,EmployeeNr from tblOrders ZipCode,City from tblZipCodes Name,Adr,ZipID from...
6
by: Orchid | last post by:
I have 2 fields with Radio button Data Type, and both fields with more than one options. On Field1, I want the user to select option1, then Field2 is shown and able to select. If the user selects...
4
by: Bill Nguyen | last post by:
I would like to be able to do the following: Listbox1/Textbox1 contains list of all items not selected item A item B item D Listbox2//Textbox2 contains list of all items selected
3
by: John Walker | last post by:
Hi, On an ASP.NET page I have a drop down list control. When the user pulls down the list and makes a selection, I perform validation, and if the validation fails I want the selected item in...
7
by: deepagulati | last post by:
Hi, I need an urgent help from you. When we dynamically genrate any list box (Select Box) it shows one default value as selected. Is there any way that we can deselect that value. I...
2
by: ahmad | last post by:
when i used the statment for(var i = 0; i < menu.length; i++) { menu.options.selected = "false"; } to deselect all the options within a list, it surprisingly selected all the options. I tried...
1
by: Heck | last post by:
Hi everyone. I have created a simple table called "ReceptionTable" to input all materials coming to a drilling rig. I have included in this table a yes/no field (check box) that is selected from a...
4
by: rn5a | last post by:
I am binding a DropDownList with records existing in a database table. I want to add an extra item *SELECT COMPANY* at index 0 so that by default, it gets selected. This is how I tried it but the...
1
by: Bailu | last post by:
Hi, I am a newbie in wxPython and doing a program with ListBox, I want to select and deselect items in this box, I have use self.devlist = wx.ListBox(self, style=wx.LB_MULTIPLE)...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.