473,287 Members | 1,581 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,287 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 8910

"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)...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
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: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.