dcsimg
HeadGrinder for me: Not receiving values in request.getParameterValues
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Raul_S
Posted On:   Sunday, March 13, 2011 04:11 AM

HeadGrinder for me: Not receiving values in request.getParameterValues I tired of solving this problem but believe I'm missing something. I'm not receiving values from request.getParameterValues of "mmsTitleAdded" Here is the process I'm using: This tr contains the MMSCategory list and onChange a javascript function is called which gets the the list of all the mmsTitles of that category: Code for tr of MMSCategory & mmsTitles: MMS Category Select MMS Category <%=mms_id.get(i) %>"><%=mms_category.get(i) %> MMS Title Select MMS Ti   More>>

HeadGrinder for me: Not receiving values in request.getParameterValues


I tired of solving this problem but believe I'm missing something.

I'm not receiving values from request.getParameterValues of "mmsTitleAdded"

Here is the process I'm using:


This tr contains the MMSCategory list and onChange a javascript function is called which gets the the list of all the mmsTitles of that category:

Code for tr of MMSCategory & mmsTitles:


MMS Category





MMS Title








This is JavaScript/AJAX function is called on onChange of a select list and gets the list of mmsTitles for the selected category.


function fetchCannedMessaged(val){
if(val == 'Select MMS Category'){
return;
}else{
document.getElementById('selected_MMSCategory').value = val;
alert("document.getElementById('selected_MMSCategory').value "+document.getElementById('selected_MMSCategory').value );
var xhttp;
if (window.XMLHttpRequest){
xhttp=new XMLHttpRequest();
}
else{
xhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xhttp.onreadystatechange = function(){
if((xhttp.readyState == 4) && (xhttp.status == 200)){
var resp = xhttp.responseText;
alert(resp);
document.getElementById('render').innerHTML=resp;


}else{
}
}
var url = "Process_CannedMessages.jsp?mms_id="+val;
xhttp.open("POST",url,false);
xhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
xhttp.send(null);
}
}


Here is the relevant code of Process_CannedMessages.jsp which is called above in the AJAX function:


<%
Connection connlocal = null;
connlocal = DBUtils.getConnection("default");
System.out.println("->getPARAMETER: "+request.getParameter("mms_id"));
String mms_id = request.getParameter("mms_id");
String query = "select canned_id,title from proxy_canned_details where mms_categoryid='"+mms_id+"' ORDER BY canned_id DESC;";
Vector results = null;
String render ="";
render = "
";

render = render +" "
+"
< <' onClick='javascript:moveOptions(this.form.mmsTitleAdded,this.form.mmsTitle);'/>"
+" >' onClick='javascript:moveOptions(this.form.mmsTitle, this.form.mmsTitleAdded);'/>
";

String resp = ""+arr[0]+","+arr[1]+"";
System.out.println("resp:"+resp);
out.println(render);
%>


And Finally, [B](thank you for bearing this far)[/B]

I am submitting the form in which tr are defined (First Code above) whose action"Submit_package_details.jsp"

Here is the Code for Submit_package_details.jsp:


String pack_name = request.getParameter("selected_pack_name");
String mmsCategory = request.getParameter("selected_MMSCategory");
String scheduled_date = request.getParameter("scheduled_date");
String[]mmsTitleAdded = request.getParameterValues("mmsTitleAdded"); // PROBLEM AREA: NOT GETTING VALUE HERE

System.out.println(pack_name); // GETTING VALUE
System.out.println(mmsCategory); // GETTING VALUE
System.out.println(scheduled_date); // GETTING VALUE


for(int i=0;i
System.out.print(mmsTitleAdded[i]+" "); //NOT GETTING VALUE
}


NOT GETTING VALUES IN ABOVE CODE IN

String[]mmsTitleAdded = request.getParameterValues("mmsTitleAdded");

SINCERE THANK YOU FOR READING THIS FAR.    <<Less
About | Sitemap | Contact