To summarize the conclusions in my previous comments:
- You cannot inject javascript into a page via the page URL. You could pass parameters in the URL, but the receiving page would need to already be coded to act on those parameters.
- You cannot use javascript from one page to act on another page if the two pages are in different domains and not pre-designed to cooperate. This is security restriction called same origin policy which you can read about here.
- So, if you can't modify page B in any way and B is in a different domain than A and A and B were not predesigned to cooperate, then you can't click the link in B from A.