Hi,
it'd be nice to send from my pas2js file something outside. Let's say after pushing WButton it sends to fphttpserver some parameters which then I'm able to catch with aReqest.QueryFields.Values[..] and work with. A little blindly I try something like
WButton.OnClick()
var
paramsOut3 : TJSURLSearchParams;
url : TJSURL;
P : TJSObject;
begin
{http://192.168.1.4:8080/?txt=22} //this is my href
p:=New(['url',window.locationString]);
url:=TJSURL(p); // now it should be already url.href assigned
url.href:=string(p['url']); //but doesn't and I have to make it by hand,
showmessage(url.href); //seems to be ok...
paramsOut3:=url.SearchParams; //so now time to separate searchParams
paramsOut3.append('txt2','12s'); //error: cannot append to 'undefined', why is undefined?
end;
So probably I try make it wrong. Someone knows how to modify url by appendin new params from pas2js?
Regards,
----
Also this doesn't seem to be ok
url:=TJSURL(window.location);
paramsOut3:=url.SearchParams;
paramsOut3.set_('txt','34'); //error undefined