Querystring if you are redirecting from page A to page B.
If page B is in an iframe on page A, then use the "parent" object in page B's DOM to access elements in page A's DOM.
http://www.eggheadcafe.com/articles/20020812.asp
if page B is launched in a new window via window.open, you use window.opener to access page A.