Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Load a external URL into a div using jQuery

I want to load a whole site into a div. When I use

$(document).ready(function(){
        $('#result').load('http://www.yahoo.com');
    });

It's not working.

like image 725
Rajasekar Avatar asked May 29 '26 13:05

Rajasekar


1 Answers

It will be a cross domain call to do using javascript. You can use iframe to load. Check this link for possible solutions.

like image 150
Teja Kantamneni Avatar answered Jun 01 '26 03:06

Teja Kantamneni



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!