[thelist] HTML Select Issue IE7

shaun at porkandpaws.com shaun at porkandpaws.com
Thu Oct 25 12:35:46 CDT 2007


I hope someone can help me I am trying to get my head round why a connected
select box script I have written is not working 

I am updating a select box (SelectElm) from javascript after a ajax call (that
returns sizes a csv string) as follows

function updateCombo(SelectElm,sizes)
	{
		
	if (SelectElm.disabled !="disabled")
	{
		while(SelectElm.hasChildNodes())
			{
				SelectElm.removeChild(SelectElm.firstChild);
			};
			
			var sizes=sizes.split(',');
		for(var x=0;x<sizes.length;x++)
			{
				var newoption=document.createElement('option'); 
				 var nodevalue=document.createTextNode(sizes[x]);
			     newoption.appendChild(nodevalue);
				 SelectElm.appendChild(newoption);	
			}
	
	}
		
	}

Of course checking DOM etc first.. 

However once this has been done and I submit the form the value is not passed
to the next page. This only occurs in IE7/6 anyone know why ! or can help
point me in the direct of a good unobtrusive connect select box script

Thanks in advance
Shaun 





More information about the thelist mailing list