Mark.b Posted January 17, 2020 Share Posted January 17, 2020 At the moment, when I use the URL given when HTML code is saved on the tryit board, it does not load up again. In a similar fashion, any code written on the tryit board cannot be saved, you just get a loading icon spinning endlessly and the URL does not appear. Any help woupd be appreciated! Link to comment Share on other sites More sharing options...
shin Posted January 19, 2020 Share Posted January 19, 2020 Yes. We are suffering the same problems. (1) Unable to save HTML pages now. (2) Saved HTML/JavaScript codes are gone (past links cannot bring back our codes.) The site seems to have physical storage problems for the past few days. Please help us to resolve the problems asap. Thanks. Link to comment Share on other sites More sharing options...
dsonesuk Posted January 19, 2020 Share Posted January 19, 2020 Any relative path links to css, images etc May not work as it is to specific directory and therefore relative path is broken. Link to comment Share on other sites More sharing options...
shin Posted January 20, 2020 Share Posted January 20, 2020 The following codes, which was directly copied from tryit editor source with alert()'s show that the php server codes does not accept saved data correctly now. globalURL = 'https://tryit.w3schools.com/code_datas.php'; --------- <!DOCTYPE html> <html> <head> <title>Simulation SaveFile of TryIt Editor</title> <div id="preSave">preSave</div> <div id="errorSave">errorSave</div> <div id="postSave" style="color:red">postSave</div> <hr> <button onclick="saveFile(`document.getElementById('textareaCode').value`)">saveFile</button> <hr> <a id="shareLink" style="color:red" href="javascript:void(0);">shareLink</a> <div id="shareLinkText" style="color:red">shareLinkText</div> <div id="saveLoader" style="color:red">saveLoader</div> <div id="saveModalSaved" style="color:red">saveModalSaved</div> <script> globalURL = 'https://tryit.w3schools.com/code_datas.php'; function saveFile(code) { alert('length='+code.length); document.getElementById('preSave').style.display='none'; if (code.length>20000) { document.getElementById('errorSave').style.display='block'; return; } document.getElementById('postSave').style.display='block'; var paramObj = {}; paramObj.code = code; var paramB = JSON.stringify(paramObj); alert('paramB= ' + paramB); var httpB = new XMLHttpRequest(); httpB.open("POST", globalURL, true); httpB.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); httpB.onreadystatechange = function() { alert(httpB.readyState + httpB.status); if(httpB.readyState == 4 && httpB.status == 200) { if(httpB.responseText.substr(0,2) == "OK" ) { var getId = httpB.responseText.substr(2); document.getElementById("shareLink").href = "/code/tryit.asp?filename=" + getId; document.getElementById("shareLinkText").innerHTML = "https://www.w3schools.com/code/tryit.asp?filename=" + getId; document.getElementById('saveLoader').style.display = "none"; document.getElementById("saveModalSaved").style.display = "block"; } // "OK" } // 4 && 200 } // onreadystatechange httpB.send(paramB); } </script> </head> <body> <h1>This is a test/simulation on W3Schools saveFile() function</h1> <p>Post to <script>document.write(globalURL);</script> is being tested.</p> <p style="color:red">Status codes: 202, 203, 204 are returned</p> <p>204: Empty Content. Server successfully executed request but without return anything.</p> </body> </html> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now