Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing AJAX to run a serverside (VB) function does... nothing?
    primarykey
    data
    text
    <p>Please forgive me for any incorrect technical words used, I'm new to AJAX/Jquery.</p> <p>I have a function with AJAX in it. It is supossed to execute a serverside function, but it doesn't do anything. I have checked my code multiple times. I use similar code in a different location, and that one works fine.</p> <p>(I have the necessary scripts imported in the html page) Here is the function with AJAX:</p> <pre><code> function pass_on() { hide_div("#outer_layout", 500); get_din(); claim_no = document.getElementById("claim_no_label").value; tempdin = document.getElementById("temp_din_label").value; var data = {}; data.ReqType = real_index; //and so on with rest of the variables. $.ajax({ type: "POST", url: "claim_form.aspx/submit", data: data, contentType: "application/json; charset=utf-8", dataType: "json", success: function() { window.location = "Defualt.aspx"; }, failure: function() { alert("FAIL!"); } }); } </code></pre> <p>and here are the corresponding functions in asp.net page:</p> <pre><code> &lt;System.Web.Services.WebMethod()&gt; _ Public Shared Function submit(ByVal ReqType As String, ByVal Claim_Num As String, ByVal Comments As String, ByVal PaymentDate As String, ByVal Payee As String, ByVal IRSNum As String, ByVal AddrStreet1 As String, ByVal AddrStreet2 As String, ByVal AddrCity As String, ByVal AddrState As String, ByVal AddrZip As String, ByVal PaymentAmount As String, ByVal FinalPaymentType As String, ByVal NAVGPercentSettlement As String, ByVal ReasonMemo As String, ByVal ProductCode As String, ByVal DeductAmount As String, ByVal DeductType As String, ByVal ClosedStatus As String, ByVal ReassignTo As String, ByVal TempDin As String) As String 'Puts values in the DB. </code></pre> <p>Sorry if the text formatting is not very good, this thing refused to work for me :P</p> <p>Can anyone point out my (probably obvious) mistake ? If any more details are needed, I'll provide them upon request :)</p> <p>EDIT: Changed the code to reflect the changes.... Still not working.</p>
    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.
    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