|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| 09/23/2009 at 03:07PM PDT, ID: 24756755 | Points: 250 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: |
//In the js
function loadControls(projectsId){
dojo.xhrGet( {
url: "ProjectsTools.jsp?action=getProjectByProjectsId&projectsId="+projectsId,
handleAs: "json",
sync: true,
timeout: 5000,
load: function(response, ioArgs) {
document.getElementById("projectName").value = response.projectName;
},
error: function(response, ioArgs) {
return response;
}
});
}
//In the JSP
if (action.equals("getProjectByProjectsId")){
Integer projectsId = Integer.parseInt(request.getParameter("projectsId"));
projects = projectsManager.getProjectByProjectsId(projectsId);
JSONSerializer serializer = new JSONSerializer();
out.println(serializer.deepSerialize(projects));
}
|
Advertisement