John Mathews John Mathews - 5 months ago 49
Javascript Question

JavaScript which Opens URL and echo its content in a Div

JavaScript which Opens URL and echo its content in a Div.

I want this Script to Open A lot of URLs one by one.

I Tried Below Code. Not working, I'm seeing Network Tab. No Request is initiating.


<input id="start" value="1">
<input id="end" value="100">
<a href="#" id="submit">start</a>

<script src=""></script>
<div id="target"></div>



var start = document.getElementById("start").value;

var end = document.getElementById("end").value;

for (i = start; i < end; i++) {

var url = $(this).attr('href');

url = '' + i;

$('#target').load(url); sleep(1000);





This doesn't work on JSFiddle because it uses https and the content you're trying to load is on an http domain. If you open the javascript console (Ctrl + Shift + J in Chrome), you can see errors about Mixed Content.

VM69 jquery-3.1.1.js:9536 Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ''. This request has been blocked; the content must be served over HTTPS.

enter image description here