Click here to Skip to main content
15,884,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.

HTML
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<a href="#"  önClick="lurl();">Click Here</a>
<br/>
<br/>
<br/><div id="durl">
</div>
<script type="text/javascript">
function lurl(){
$('#durl').load('http://www.tndte.com/Result/');
}
</script>
</html>
Posted
Updated 5-Aug-22 17:50pm
Comments
Marco Bertschi 15-Mar-13 11:04am    
Uhm..

Can you post the HTML text too?
hari301 15-Mar-13 11:40am    
above code is full only.. starting html tag only missed.

Hello,

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.

Regards,
 
Share this answer
 
Comments
hari301 15-Mar-13 11:41am    
can u explain in some other way??
Prasad Khandekar 15-Mar-13 16:43pm    
Hello,

In your example you are trying to load contents from http://www.tndte.com/Result/. This call will succeed only if the page trying to perform this operation was served from the same domain i.e. www.tndte.com. 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.

Regards,
It is working for me

<div id="topBar"> <a href ="#" onclick="load_home()"> HOME </a> </div>
<div id ="content"> </div>
<script>
      function load_home(){
            document.getElementById("content").innerHTML='<object type="type/html" data="home.html" ></object>';
  }
</script>
 
Share this answer
 
Cannot working it's says plugin not supported. While clicking on click here.
Please help
 
Share this answer
 
Comments
Richard Deeming 9-Aug-22 9:25am    
Your error message is not a "solution" to someone else's question.

If you want to ask a question, then ask a question[^] - but be sure to provide a clear and complete description of the problem, what you have tried, and where you are stuck.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900