[Javascript] Q on SELECT Options

Walter Torres walter at torres.ws
Thu Feb 6 22:08:58 CST 2003


Well, the method runs twice.

The hilighted item from the pervious list does not un-hilight, and the new
list loses focus.

So, I guess I could say nothing working!  ;)

Walter


> -----Original Message-----
> From: javascript-admin at LaTech.edu
> [mailto:javascript-admin at LaTech.edu]On
> Behalf Of Peter Brunone
> Sent: Thursday, February 06, 2003 9:58 PM
> To: javascript at LaTech.edu
> Subject: RE: [Javascript] Q on SELECT Options
>
>
> Walter,
>
> 	What is it that's not working?
>
> -Peter
>
> |-----Original Message-----
> |From: javascript-admin at LaTech.edu
[mailto:javascript-admin at LaTech.edu]On
|Behalf Of Walter Torres
|
|I have 2 lists.
|
|I am trying to make it so that when you select an item in LIST_A, the item
|selected in LIST_B (if any) is deselected and the focus to stay in LIST_A.
|
|This is what I have, but it's not working.
|
|Thanks
|
|walter
|
|<select name='master' size='7' onFocus='setListFocus(this)'>
|   ... options here
|</select>
|
|// global to store what list is currently in focus
|var objFocusList;
|
|// Set Focus and remove focus from other List
|function setListFocus ( objList )
|{
|	if ( objList == objFocusList)
|		return
|
|	if ( typeof ( objFocusList ) == 'object' )
|
|objFocusList.options[objFocusList.selectedIndex].selected = false;
|
|	objFocusList = objList;
|}
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list