Hi,
I have a hidden field called "hRank". And in "selectChange" function i am passing the index of drop down list as a parameter, which is stored in "intSelectedValIndex" and storing it in "hRank", as shown in the function below.
Please tell me how to retrive that "hRank" value.
So that i can use that value instead of "3" which now i have hardcoded.
"CaseType = CaseTypeLevel1List.getItem(3)"
I dont want to reload the page.
I have pasted the same code below. I am trying this for a long time, but hvnt got a solution. Please help.
thanks,
Tina.
function selectChange(intSelectedValIndex,controlToPopulate)
{
window.document.form1.hRank.value=intSelectedValIndex;
var intRank = intSelectedValIndex;
var myEle;
<%
//String fid = request.getParameter("hRank"
//int id = Integer.parseInt(fid);
CaseType = CaseTypeLevel1List.getItem(3);
CaseTypeLevel2List = CaseType.getChildChoiceList();
if(CaseTypeLevel2List != null)
{
for(int nLevel2 = 1; nLevel2<= CaseTypeLevel2List.getCount(); nLevel2++)
{
%>
myEle = document.createElement("option" ;
myEle.value = "<%=nLevel2 %>"
myEle.text = "<%=CaseTypeLevel2List.getItem(nLevel2).getTitle()%>"
controlToPopulate.add(myEle) ;
<%
}
}
%>
}
I have a hidden field called "hRank". And in "selectChange" function i am passing the index of drop down list as a parameter, which is stored in "intSelectedValIndex" and storing it in "hRank", as shown in the function below.
Please tell me how to retrive that "hRank" value.
So that i can use that value instead of "3" which now i have hardcoded.
"CaseType = CaseTypeLevel1List.getItem(3)"
I dont want to reload the page.
I have pasted the same code below. I am trying this for a long time, but hvnt got a solution. Please help.
thanks,
Tina.
function selectChange(intSelectedValIndex,controlToPopulate)
{
window.document.form1.hRank.value=intSelectedValIndex;
var intRank = intSelectedValIndex;
var myEle;
<%
//String fid = request.getParameter("hRank"
//int id = Integer.parseInt(fid);
CaseType = CaseTypeLevel1List.getItem(3);
CaseTypeLevel2List = CaseType.getChildChoiceList();
if(CaseTypeLevel2List != null)
{
for(int nLevel2 = 1; nLevel2<= CaseTypeLevel2List.getCount(); nLevel2++)
{
%>
myEle = document.createElement("option" ;
myEle.value = "<%=nLevel2 %>"
myEle.text = "<%=CaseTypeLevel2List.getItem(nLevel2).getTitle()%>"
controlToPopulate.add(myEle) ;
<%
}
}
%>
}