What I want to do is put a query string in get_ajax_text.php and communicate via get.
I tried to make a test code, but I couldn't even communicate with get in the previous stage.Crying
If you enter the content-type, the post communication was successful.
First of all, please let me know if you can communicate with get or if you can include query strings.
echo <<HTML
<script>
var login;
vardata={login:1};
varajax = new XMLHttpRequest();
ajax.open('GET','./get_ajax_text.php', true);
//ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
ajax.send (EncodeHTMLForm2(data));
functionEncodeHTMLForm2(data){
var params=[];
for (var name in data) {
var value = data [name];
varparam=encodeURIComponent(name).replace(/%20/g, '+')+'='
+ encodeURIC component(value).replace(/%20/g, '+');
param.push(param);
}
return param.join('&');
}
</script>
HTML;
I solved myself.
with null in the ajax.send argument
in ./get_ajax_text.php
./get_ajax_text.php?login=1
Then I could give it to you with get.Thank you, everyone.
678 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
540 Unable to install versioned in Google Colab
546 Who developed the "avformat-59.dll" that comes with FFmpeg?
541 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
524 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.