title: hyperlink click to load new page an execute javascript
body: <p>I have two pages, <code>a.html</code> and <code>b.html</code>.</p>
  
  <p>In b.html there are two buttons <code>b1</code> and <code>b2</code> which on clicking run javascript function <code>pop()</code> with parameters passed as <code>b1</code> and <code>b2</code> respectively. Now running pop changes the contents of my <code>b.html</code> depending on the button clicked.</p>
  
  <p>Now I have two hyperlinks <code>a1</code> and <code>a2</code> in <code>a.html</code>.
  What I want to achieve here is, if I click <code>a1</code> I want <code>b.html</code> to be loaded and the contents to be displayed as it would have been after clicking <code>b1</code>.</p>
  
  <p>So basically when I click <code>a1</code> in <code>a.html</code>, I want <code>b.html</code> to be loaded and then <code>pop()</code> to be executed with <code>b1</code> as parameter and the resulting page displayed. Can it be done?</p>