Click here to Skip to main content
11,930,843 members (56,838 online)
Rate this:
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 15-Mar-13 11:04am

Can you post the HTML text too?
hari301 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 15-Mar-13 11:41am
can u explain in some other way??
Prasad Khandekar 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151126.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