• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to split ajax variable name?

 
Arulmozhi Govindaraju
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
function makeAjaxCallForProj(Id){

var ajaxUrl = "<%=request.getContextPath()%>/ProjectEditAction.do?mtc=getProjByDuId&ID="+Id;
var projResult = getAjaxResult(ajaxUrl); //here only stored project active and inactive
alert(projResult);

//var projResult= result.substring(0,result.indexOf("@#%"));
//var deptResult= result.substring(result.indexOf("@#%")+3,result.length);
var projIdDescArray = splitAjaxResponse(projResult);
updateComponent(projIdDescArray,'projDiv','Project');

}

var projResult = getAjaxResult(ajaxUrl); //here only stored project active and inactive how to split active and inactive i need separate to list in that project ?
 
Swastik Dey
Rancher
Posts: 1601
5
Android Java Java ME
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And how are they stored? I mean what separates the two values?
 
Arulmozhi Govindaraju
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Swastik Dey wrote:And how are they stored? I mean what separates the two values?


store the value getting from action(struts)and dao method and implement Ajax URL
the separates values active project and inactive project the project values comes to project-name#0 and project-name#1
0 means inactive projects 1 means active projects. The projects separate two list box one active project another one is inactive project it will be based on drop-down value
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic