which can only be done if both pages are from the same domain.
Your post is like a big blob of your thought process that has just been dumped on the page. You need to learn to use punctuation and to see what you've written from the point of view of the people reading what you've written. At the moment it's a difficult-to-understand mess.
If you post some sample code of what you're thinking of doing it might be clearer.