I have a job board website/script that uses 3rd party content that I collect from an XML feed. When the applicant hits the apply button for a job, an iframe opens but they are redirected to another website to apply. I would like the domain in the iframe to stay the same as my domain so they would appear to be applying on my domain. I tried changing:
window.location = '<?php echo jb_escape_html($data['app_url']);?>';
To
$('iframe').attr('src','<?php echo jb_escape_html($data['app_url']);?>';
But the iframe does not load the redirected url and gives a blank page as output. please help me overcome this hurdle.
Here is the original code
// redirect the user to a custom URL
jb_app_redirect_script($data);
} elseif (JB_ONLINE_APP_SIGN_IN!='YES') {
// users can apply without logging in
jb_app_redirect_script($data);
}
}
function jb_app_redirect_script(&$data) {
?>
<script type="text/javascript">
function js_redirect() {
// //parent.window.location = 'http://www.cnn.com/';
window.location = '<?php echo jb_escape_html($data['app_url']);?>';
}
window.onload = js_redirect;
</script>
<?php
}
$JBMarkup->body_close();
$JBMarkup->markup_close();