aspose file tools*
The moose likes Struts and the fly likes Select problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Select problem" Watch "Select problem" New topic
Author

Select problem

Derek Drever
Greenhorn

Joined: Mar 01, 2002
Posts: 18
Hi,
I have the following code:
<script language="Javascript">
function unselectId()
{
document.update.id.options[document.update.id.selectedIndex].selected = false;
}
</script>
<html:select onchange="unselectId()" property="type">
<html ptions collection="Type" property="value" labelProperty="label"/>
</html:select>
<html:select property="id" size="7" >
<html ptions collection="Name" property="value" labelProperty="label"/> </html:select>
I am trying to unselect anything selected on the id list when something is selected on the type list, but the code fails. I would be gratefull for any suggestions.
Regards,
Derek.
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4462
    
    6

try setting selectedIndex = -1 instead.


Junilu - [How to Ask Questions] [How to Answer Questions]
Derek Drever
Greenhorn

Joined: Mar 01, 2002
Posts: 18
I tried that and it had no effect, any other ideas gratefully received.
Derek Drever
Greenhorn

Joined: Mar 01, 2002
Posts: 18
disregard the previous comment, it worked, thanks for that.
Regards,
Derek.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Select problem