AJAX statement RRS feed

  • Question

  • User-18738458 posted


    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");
                url: wbURL,
                dataType: "xml",
                contentType: "text/xml; charset=\"utf-8\"",
                type: "POST",
                headers: '@"SOAPAction:http://A-URL/Which-works"',
                sucess: TESTXML,
                error: xmlError
        /* Function Declaration */
        /* activate Bootstrap tool-tip option. turned off by default */
        $(function () {
        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


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

    it shows BOTH alert pop-ups.

    can someone show me where I am going wrong?

    Thank you

    Friday, July 6, 2018 9:28 AM

All replies

  • User-18738458 posted

    Hello. There seems to be an error in the SOAP request. when I try a simpler one, it works.

    thank you for anyone that was looking into this for me.

    Friday, July 6, 2018 10:33 AM