apply via linkedin javascript redirect on success

落爺英雄遲暮 提交于 2019-12-11 23:42:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!