Saturday, December 18, 2010

Dojo : Ajax

 <button id="bb" name="bb" value="AJAX" dojoType="dijit.form.Button" title="AJAX" onclick="koko();">
         <script type="text/javascript"  >
function koko(){
dojo.xhrGet( {
     
        url: "ajaxTest.jsp",
        handleAs: "text",

        timeout: 5000, // Time in milliseconds

        // The LOAD function will be called on a successful response.
        load: function(response, ioArgs) { //
          dojo.byId("dataArea").innerHTML = response; //
          return response; //
        }});
}
        </script>
    </button>
<textarea  id="dataArea" >
</textarea>

No comments:

Post a Comment