Why the external text file not loaded?

95 Views Asked by At
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$.noConflict();
jQuery(document).ready(function ($) {
$("#btnclick").click(function () {
$("div").load("https://drive.google.com/file/d/0B1ysrWPjNhlcblQtUmx3YTBpUG8/view?usp=sharing", function (responseTxt, StatusTxt, xhr) {
if (statusTxt == "success") {
alert("Your content load successfully !!");
}
if (statusTxt == "error") {
alert("Error: " + xhr.status + ":" + xhr.statusText);
}
});
});
});
</script>
</head>
<body>
<div>
<p>Click the button to insert text after the image.</p>
</div>
<button id="btnclick">Click Here TO Change The Content</button>
</body>
</html>

I am getting an txt file from my google drive. it is shared google link. but it did not loaded. The text file is a shareable link. Please use the same text file or different file, if the given text file is not worked. the link was: enter link description here

0

There are 0 best solutions below