Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: Javascript jQuery
Here the below i have wriiten for load the webpage inside of div tag via 'url' i've enclosed. but it not working. can anyone know. pls help.
<script src="//"></script>
<a href="#"  önClick="lurl();">Click Here</a>
<br/><div id="durl">
<script type="text/javascript">
function lurl(){
Posted 15-Mar-13 5:32am
Marco Bertschi at 15-Mar-13 11:04am
Can you post the HTML text too?
hari301 at 15-Mar-13 11:40am
above code is full only.. starting html tag only missed.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Due to browser security restrictions, most "Ajax" requests are subject to the same origin policy; the request can not successfully retrieve data from a different domain, subdomain, or protocol.
hari301 at 15-Mar-13 11:41am
can u explain in some other way??
Prasad Khandekar at 15-Mar-13 16:43pm
In your example you are trying to load contents from This call will succeed only if the page trying to perform this operation was served from the same domain i.e. If the page trying to perform this load operation was not originally server from the said domain then it's said to violets the Same Origin Policy and browser will restrict this call.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 434
1 OriginalGriff 385
2 CHill60 230
3 CPallini 220
4 Abhinav S 200
0 Sascha Lefévre 75
1 OriginalGriff 70
2 F-ES Sitecore 55
3 Peter Leow 50
4 Dave Kreskowiak 40

Advertise | Privacy | Mobile
Web01 | 2.8.150327.1 | Last Updated 15 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100