问题
The project: http://www.atlas.dentasignclients.com/professionals
Hi guys, I'm building a project for a business friend of myne, which involves sending job applications via linkedin. After a user sends the job application and closes the frame, I'd like to redirect the user to a different page, where they will fill in additional information.
Right now, the linkedin application works, but I can't get it to make a response. The linkedin api gives an example with the myOnsucesssFunction, but I can't get it to work. Looking at the ccode below, how would you get the redirect to work?
The code, condensed -->
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: lus36y4mbt09
</script>
<div class="pagination-centered">
<script type="IN/Apply" data-companyname="Atlas China" data-jobtitle="Atlas China Member" data-joblocation="China" data-logo="http://atlas-china.com" data-email="abe@atlas-china.com"></script>
<h4>or</h4>
</div>
<script type="text/javascript">
function myOnsucesssFunction(r) {
alert("success");
console.log(r);
document.location = 'http://google.com/';
}
</script>
回答1:
<script type="text/javascript">
function linkedInAppSuccess() {
window.location = "<?php echo home_url('/'); ?>record-your-multi-lingual-abilties/"
}
</script>
<script type="IN/Apply" data-companyname="Atlas China" data-jobtitle="Atlas China Member" data-joblocation="China" data-logo="http://atlas-china.com" data-email="abe@atlas-china.com" data-onsuccess="linkedInAppSuccess"></script>
来源:https://stackoverflow.com/questions/17882024/apply-via-linkedin-javascript-redirect-on-success