Call the function from one page to another page after self href
<p>I want to after click the link of page1, page 2 will be displayed and page 2 will then run the function of its page: <code>function() {$('a.poin1').trigger("click");</code></p>

<p>I have searched many related topics and try to write the code as below but it didn't work.</p>

<p>I will be very appreciated if any one could help. Thanks so much.</p>

<pre><code>&lt;a target="_self" href="page2.html" onclick="MyFunction();&gt;
link to page 2
&lt;/a&gt;

&lt;script type="text/javascript"&gt;
function MyFunction(){
function() {$('a.poin1').trigger("click");
}
&lt;/script&gt;
</code></pre>
