3.2.0

AW.HTTP.Request

Hi,
How can I put array using AW.HTTP.Request to JSP or HTML at the server side.

Thanks a lot.
November 7,
http://www.activewidgets.com/aw.http.request/parameter.html

setParameter method accepts an array. When the parameter type is array - each array value is sent as a separate name=value pair (using the same name).
Alex (ActiveWidgets)
November 8,
Hi Alex.
Thanks.
How to put obj using AW.HTTP.Request from the server side. Is it possible?

Client:

function getGrid(){
var req = new AW.HTTP.Request;
req.setURL("Response.jsp");
req.setRequestMethod('POST'); 
req.setAsync(false)

req.response = function(data){
    document.write(data);
}
req.request(); 
}
</script>
</head>
<body>
<script>
 getGrid();
</script>
  <span

            style="cursor: pointer; text-decoration: underline"
            onclick="getGrid();">
                Make a request
   </span>
</body>


Server: Response.jsp

var tree = { 
        0: [1, 2, 3], 
        1: [4], 
        2: [7], 
        3: [8], 
        4: [5,6] 
         
    } 
    var obj = new AW.UI.Tree; 

obj.onItemClicked = function(event, index){

alert("you clicked on the " + index + " leaf");
window.status = index; // should work now 
} 
obj.onItemStateChanged = function(value, index){ 
    this.getItemTemplate(index).refreshClasses();     return true; 
} 

    obj.setItemText(["", "A", "B", "C", "A1", "A11", "A12", "B1", "C1"]); 
    obj.setViewCount(function(i){return tree[i] ? tree[i].length : 0}); 
    obj.setViewIndices(function(i){return tree[i]}); 
    obj.setStyle("background", "lightyellow");
    document.write(obj);


Whats wrong ?
How to solve this problem?

Thanks a lot.
November 10,

This topic is archived.

See also:


Back to support forum