Re: FireFox & getElementById issue?

2009-02-19 Thread rex

MemberName should have ID and NAME

If it works in IE, that means that MemberName only has NAME since IE 
resolves the getElementById function to both the ID and NAME of the object

in this code example, both selects will work in IE but only the second 
one will work in FF


xx
yy
zz



xx
yy
zz



function alertList(){
var list = document.getElementById("MemberName");
alert(list.options.length);
}
function alertList2(){
var list = document.getElementById("MemberName2");
alert(list.options.length);
}


Austin Band wrote:
> Hello, I need a little help. I have javascript that works with IE but not 
> FireFox. 
> 
> The code:
> 
> 
> function addItemsToParent(){
> var MemberList= "";
> var list = document.getElementById("MemberName").value;
> for(var i=0; i   if(list.options[i].selected){
>   MemberList = MemberList + ","+list.options[i].value;
>   }
>   opener.document.MemberName.value = MemberList;
>   self.close();
>   }
> 
> 
> 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:319516
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: FireFox & getElementById issue

2009-02-18 Thread Charlie Griefer


and... are you sure there is only one element with that specific ID?  really
really sure?

On Wed, Feb 18, 2009 at 10:15 PM, Joel Polsky wrote:

>
> I'm not a javascript expert..but try