xml - xmlhttp request and querystring parameters -
i want create bookmark send parameter querystring such author=john smith inserted rails app, have far correct? providing find out how url parameters
function updatedata(param) { var myurl = 'http://localhost:3000/app/book'; http.open("get", myurl + "?author=" + value-of-querystring-param, true); http.onreadystatechange = usehttpresponse; http.send(null); }
that looks should work, presuming usehttpresponse
handler function.
one thing should encode parameter:
http.open("get", myurl + "?author=" + encodeuricomponent(param), true);
Comments
Post a Comment