<select name=lstMAName"+s+" onchange=showMAName(escape(this.value),"+s+")><option selected>- - -Select Account- - -</option> <% for(j=0;j!=i;j++){%><option value=<%=MANAME[j]%>><%=MANAME[j]%></option><%}%></select>
In the above code i use escape, 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 esacpe & unescape but iam not getting properly plz tell me how to use here escape & unescape
function showMAName(str,str1)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
alert(str1)
alert(str)
var str=unescape(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;
}
}