i have a jsp page... i am adding some content to page dynamically depending upon request parameters (an array will be returned by request) based on this i have to create a drop down. i want to do this on change of another drop down.. so can be done using javascript only but i am unable to use scriptlet in js, is this really possible??
EDIT : i wanna perform some actions on the values retrieved from scriptlet as well
it will be of this sort
function changeMethod(){
var templateselected = document.getElementById("templateDropDown");
var versionDropDown = document.getElementById("versionDropDown");
if ( templateselected.options.selectedIndex != -1)
{
var selected=templateselected[templateselected.options.selectedIndex].value;
removeChildNodes(versionDropDown);
<%
RetrieveTempSecVersions[] lsListOfFiles = (RetrieveTempSecVersions []) request.getAttribute("templateNames") ;
for (int i=0 ; i < lsListOfFiles[1].getVersionNumber().length ; i++ ) {
System.out.println("helllooooo");%>
versionDropDown.innerHTML+='<OPTION VALUE="'+<%=lsListOfFiles[1].getVersionNumber()[i]%>+'">'+<%=lsListOfFiles[1].getVersionNumber()[i]%>+'</OPTION>';
<%}%>
}
}