Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

AJAX statement

$
0
0

Hello,

I have an AJAX statement that I have developed on another page (which works when I click on it), and I am now moving over to the "live" page, and it doesn't.

This is the Code that doesn't seem to work (IE the Function calls do not seem to be actioned)

$(document).ready(function () {
    //use STRICT javascript rules when parsing this document"use strict";

    /* Variable declaration */

some variables in here


    /* Click Listener */
    $('.welBedButton').click(function () {

        var iSelector = $(this).find('span:first');

        if (iSelector.hasClass('glyphicon glyphicon-bed')) {
            iSelector.removeClass('glyphicon glyphicon-bed')
            iSelector.addClass('glyphicon glyphicon-cloud-upload')                                  // Change BED icon to CLOUD UPLOAD icon
            this.innerHTML = this.innerHTML.replace('Send', 'Sending');                             // Change the Button Text when clicked
        }
        console.log(" button clicked. Excellent");$.ajax({
            url: wbURL,
            dataType: "xml",
            contentType: "text/xml; charset=\"utf-8\"",
            type: "POST",
            headers: '@"SOAPAction:http://A-URL/Which-works"',
            data: 'SOAP STATEMENT THAT WORKS ON ANOTHER PAGE',

            sucess: TESTXML,

            error: xmlError
        });
    });

    /* Function Declaration */

    /* activate Bootstrap tool-tip option. turned off by default */
    $(function () {$('[data-toggle="tooltip"]').tooltip();
    });


    function TESTXML(data, textStatus, jqXHR) {
        alert("got here: sucess");
        console.log("textStatus: " + textStatus);
        console.log("jqXHR: " + jqXHR.responseText);
        alert(textStatus + " " + jqXHR.responseText);
    }



    function xmlError(jqXHR, textStatus, message) {

            alert("got here: ERROR");
    }


});

if I replace

sucess: TESTXML, 
error: xmlError

with

sucess: alert("Sucess"), 
error: alert("Error")

it shows BOTH alert pop-ups.

can someone show me where I am going wrong?

Thank you


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>