Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by chesplay on Nov 26, 2008 23:18
open dhtmlx forum
servlet called with long paramters appended in url and populate the grid

Hi i am using the dhtmlx grid which is one of the fastest grid n i liked it.
i am populating the grid using servlet, this servlet is called using smart rendering as


gridbox2.loadXML("DATASERVLET?datastring="+datastring+"&count="+count+"&dbenvi="+dbenvi+"&proptypeValue="+proptypeValue+"&constrvalValue="+constrvalValue+"&dateValue="+dateValue,funcrowcount);

 

but here my datastring value contains very long string that normally cannot be appended in the url , therefore my url is not getting properly created and the servlet is not called, therefore to call the servlet i am using jQuery with which i can call the servlet and pass parameters in post request.

$.post("DATASERVLET",{datastring: $("#vname1").val(),count:$("#vname2").val(),dbenvi:$("#vname3").val(),proptypeValue:$("#vname4").val(),dateValue:$("#vname5").val(),constrvalValue:$("#vname7").val()},function(data){document.getElementById('vname6').value=data;document.body.style.cursor="default"; });

now with jquery i am able to call the servlet  but how do i populate the grid with the xml generated by the  jquery called servlet.

if i write like this
gridbox2.loadXML($.post("DATASERVLET",{datastring: $("#vname1").val(),count:$("#vname2").val(),dbenvi:$("#vname3").val(),proptypeValue:$("#vname4").val(),dateValue:$("#vname5").val(),constrvalValue:$("#vname7").val()}),fucrowcount);


it display error and says

Object doesnot support this property..

please help me how do i call a servlet with parameters in post request and populate grid with the xml generated from this servlet.

 

 


 

Answer posted by Support on Nov 27, 2008 02:09
>>gridbox2.loadXML($.post("DATASERVLET",{
myst be 
    gridbox2.parse($.post("DATASERVLET",{

Also, there is an optional extension which allows native post processing for grid
              http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&page=1&q=3450&ssr=yes&s=post%20load%20xml