brr 0 Light Poster
var oC2TD = oTR.insertCell(1);
oC2TD.innerHTML = "<select name=lstMAName"+s+" onchange=showMAName(encodeURI(this.value),"+s+")><option selected>- - -Select Account- - -</option> <%	for(j=0;j!=i;j++){%><option value=encodeURI(<%=MANAME[j]%>)><%=MANAME[j]%></option><%}%></select>";

In the above code i use encodeURI, bcz in listbox i have to select on name, i have to send that name to showMAName function in another .js program, here iam getting problem that for example selected text is Adavance From Others, if there is any space in text, after space the text not getting like Advance only iam getting to the .js program, so for that i use encodeURI & decodeURI but iam not getting properly plz tell me how to use here encodeURI & decodeURI

function showMAName(str,str1)
{ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Your browser does not support AJAX!");
		return;
	} 
	alert(str1)
	alert(str)
	var str=decodeURI(str);
	alert(str)
var url="getSaname.jsp";
url=url+"?maname="+str+"&rowid="+str1;
document.getElementById("str").value=str1;
xmlHttp.onreadystatechange=stateChanged1;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged1() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		var str=document.inetform.str.value
		document.getElementById("lstSAName"+str).innerHTML=xmlHttp.responseText;
	}
}