dojo: Send Data by POST

<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN”
    <!– load the dojo toolkit base –>
    <script type=”text/javascript” src= “dojo/dojo/dojo.js”
        djConfig=”parseOnLoad:true, isDebug:true”></script>
    <script type=”text/javascript”>
       // Load Dojo’s code relating to the Button widget

       function helloCallback(data,ioArgs) {
       function helloError(data, ioArgs) {
          alert(‘Error when retrieving data from the server!’);

<form id=”myForm” method=”POST”>
      Please enter your name: <input type=”text” name=”name”>

<button dojoType=”dijit.form.Button” id=”helloButton”>
        Click here to read data from the server!!
      <script type=”dojo/method” event=”onClick”>
        url: ‘SendRequestbyPOST.jsp’,
        load: helloCallback,
        error: helloError,
        form: myForm

    <style type=”text/css”>
    /* CSS  */ 
    .testClass {
        <h1 id=”testHeading”>Dojo Send Data by POST</h1>       
        <div id=”contentNode”>

///NOTE: Create a simple jsp page to read Query String parameter : Name.
///something like: <%= request.getParameter(“name”) %>
// and name it as : SendRequestbyPOST.jsp

One Response

  1. alert(“hiiiiiiiiiiiiiii”);

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: