07-21-2022 04:37 AM
I try to get the WebService example running:
https://forums.ni.com/ni/attachments/ni/7308/5/1/Add%20Two%20with%20Submit%20button.zip
Querying the vi via browser does work.
using the submit button leads to connection error:
I am not sure if this is related, but there is not WebService displayed in WIF configuration.
Solved! Go to Solution.
07-21-2022 07:59 AM
The mentioned example hardcodes port 8001 into the request. (addTwoWithSubmit.js)
function update()
{
URL = "http://127.0.0.1:8001/WebClient/AddTwo?first="
URL = URL + $('#firstNumber').val() + "&second=" + $('#secondNumber').val();
I replaced this code with:
URL = document.URL;
URL = URL.replace("addTwoWithSubmit.html", "") + "AddTwo";
URL = URL + "?first=" + $('#firstNumber').val() + "&second=" + $('#secondNumber').val();
now it works.