I have two pages, a.html and b.html.
In b.html there are two buttons b1 and b2 which on clicking run javascript function pop() with parameters passed as b1 and b2 respectively. Now running pop changes the contents of my b.html depending on the button clicked.
Now I have two hyperlinks a1 and a2 in a.html.
What I want to achieve here is, if I click a1 I want b.html to be loaded and the contents to be displayed as it would have been after clicking b1.
So basically when I click a1 in a.html, I want b.html to be loaded and then pop() to be executed with b1 as parameter and the resulting page displayed. Can it be done?
You could do it through URL parameters, such as a.html?value=test.
On
a.html, clicking the button takes you tob.html?dopop=true.You can then implement some Javascript on the page load (
$(document).load(function() {});, & there’s plenty of jQuery plugins to handle the parameters) to check if dopop is specified or true. If it is, execute that function.