Skip to content Skip to sidebar Skip to footer

Alternative To Iframe To Pull In Actual Data From An External Website Or Form

OK... I'll try to be complete with my question (so, sorry for the lengthiness)... I've been trying to search all over the web for an ideal solution. I build our company's web site

Solution 1:

If you don't want to use iframe and you are using jQuery, you can do something like this. Try the following code:

Instead of an iframe tag use div tag

<div id="divId"></div>

Place this code inside your <head> tag

<head><scripttype='text/javascript'src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js?ver=1.4'></script><scripttype='text/javascript'>
$(document).ready(function (){
$('#divId').load(url of target website what you must load);     
});
</script></head>

All the contents from target site or page(specified url) will be inserted inside the #divID div tag. Hope this helps. All the best!

Solution 2:

You can try the object element which will allow you to click on links that target the child page. Try this:

<object height="100%" width="100%"data="http://foo.com">

set your style to:

html, body{height: 100%;min-height: 100%;}

Make sure you set up CORS if the child page is NOT on the same domain as the parent page.

Post a Comment for "Alternative To Iframe To Pull In Actual Data From An External Website Or Form"