Note that there are some explanatory texts on larger screens.

plurals
  1. POcapturing form response in html
    primarykey
    data
    text
    <p>I have a form in html page, I tried to use AJAX to capture the response but somehow I did not send the request to the server. Where am I wrong?</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script&gt; $(function() { $(".button").click(function() { var clin=$("input#client").val(); var us=$("input#username").val(); var dataString='client='+clin+'&amp;username='+us; $.ajax({ type: "POST", url: "http://localhost:8080/services/web?wsdl/authen", data: dataString, success: function(response) { alert("The server says: " + response); } }); return false; }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="myform"&gt; &lt;form name="frm1"&gt; &lt;table&gt; Enter Your User Account: &lt;tr&gt; &lt;td&gt;Client ID&lt;/td&gt; &lt;td&gt; &lt;input class="text-input" type="text" size="30" name="client" id="client"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;User ID&lt;/td&gt; &lt;td&gt; &lt;input class="text-input" type="text" size="30" name="username" id="username"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td align="right"&gt; &lt;input type="submit" name="submit" value="get" class="button" id="submit_btn"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I would like to capture the form response in AJAX but not sure if I did was correct?<br> I provide my server web services: </p> <pre><code> xs:element name="authen"&gt; &lt;br&gt; xs:complexType&gt; &lt;br&gt; xs:sequence&gt; &lt;br&gt; xs:element name="ClientID" type="xs:string" nillable="true" minOccurs="0"/&gt; &lt;br&gt; xs:element name="UserID" type="xs:string" nillable="true" minOccurs="0"/&gt; &lt;br&gt; /xs:sequence&gt;&lt;br&gt; /xs:complexType&gt;&lt;br&gt; /xs:element&gt;&lt;br&gt; xs:element name="authenResponse"&gt;&lt;br&gt; xs:complexType&gt;&lt;br&gt; xs:sequence&gt;&lt;br&gt; xs:element name="return" type="xs:string" nillable="true" minOccurs="0"/&gt;&lt;br&gt; xs:sequence&gt;&lt;br&gt; xs:complexType&gt;&lt;br&gt; xs:element&gt;&lt;br&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload