ajax url
Posted: Fri Mar 14, 2014 10:27 am
I am have an ajax command in my java script and it works great with all hard coded values. How do it get it to work with a variable value? I have tried create the URL as a variable and entering ajax(variable) which included the complete URL
This works:
var responseText = ajax("http://as400.bass-net.com:10088/testbs/ ... ewcont=109");
This does not work:
var container = 109
var myajax = '"http://as400.bass-net.com:10088/testbs/ ... p?newcont=' + container + '"';
var responseText = ajax(myajax);
Thanks
bill
This works:
var responseText = ajax("http://as400.bass-net.com:10088/testbs/ ... ewcont=109");
This does not work:
var container = 109
var myajax = '"http://as400.bass-net.com:10088/testbs/ ... p?newcont=' + container + '"';
var responseText = ajax(myajax);
Thanks
bill