hmm... document.getElementById("MemberName").value will return a VALUE
of SELECTED option. if no option was selected this should be
null/undefined...

i am not sure why it is working in IE - it really should not... maybe it
works because IE always assigns a value to a select element, even if no
option was selected by user...

i believe what you need is just
var list = document.getElementById("MemberName");


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Austin Band wrote:
> Hello, I need a little help. I have javascript that works with IE but not 
> FireFox. 
>
> The code:
>
> <script = "Javascript1.2">
> function addItemsToParent(){
> var MemberList= "";
> var list = document.getElementById("MemberName").value;
> for(var i=0; i<list.options.length; ++i)
>       if(list.options[i].selected){
>               MemberList = MemberList + ","+list.options[i].value;
>                               }
>       opener.document.MemberName.value = MemberList;
>       self.close();
>       }
> </script>
>
> The error returned in Error Console is that the list is null. This works 
> correctly in IE. The goal is to select a name and it displays in the textbox
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319378
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to