$(document).ready(function () {
url = window.location.href;
var querystring = url.split("?")[1]; //GuessID=123&someother=123
var targeurl = "http://old.racingnsw.com.au/default.aspx?s=search-wp&" + querystring;
var $iframe = $('#horse-name-search-iframe');
if ($iframe.length) {
$iframe.attr('src', targeurl);
$('#horse_name_searchid').load('http://old.racingnsw.com.au/default.aspx?s=search-wp #ctl06_Container');
return false;
}
return true;
});
<div id="horse_name_searchid" class="horse_name_search1" style="overflow: hidden; height: 703px;">
<iframe id="horse-name-search-iframe" src="http://old.racingnsw.com.au/default.aspx?s=search" style="margin-top: -260px;" width="100%" height="1000" frameborder="0" ></iframe>
</div>
display-only.png
ASKER
ASKER
ASKER
JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.
TRUSTED BY
You should choose one of these methods - not both. If you choose to go with the iFrame, you're not able to set the src to be a partial so you would get the whole page within a page. If you want to set the content of the DIV with a partial, then you would need to examine the target page and select a partial by using an ID on some wrapper, such as #ctl06_Container in your example.
Having said that, even if you do load that partial, I'm not sure how it would work in your own site because it contains a form which is likely to submit to a page on the tagret site, not on your own.
You may have to re-think what you're trying to acheive here.