joelau

Unable to get the value from web service

Discussion created by joelau on Mar 15, 2018

I put below script to "Form Setting" --> "Custom Javascript", supposed the web service method abc will return a string "Hello World", i want put the return value to textbox control named txtHello, but i got an alert msg "Sorry could not proceed" when the form first load. anyone have idea? thanks.

 

 

fun();

function fun()
{
    var data="hello";
    $.get('http://myweb/web_service/nintex.asmx/abc',{},function(response)
    { data = response;
    }).error(function(){
    alert("Sorry could not proceed");
});

NWF$("#" + txtHello).val(data);
}

Outcomes