How can I access displayed data on one window from another window?

I have a Web application that inserts a record into a database table. After inserting the record successfully, I open a new window that is dynamically built JavaScript in the ASP.NET Code Behind (in C#). In that window, I have an HTML page using Frames that displays 4 pages: header, instructions, results from submitting a form to an external web page, and a footer. In the 3rd page in the Frame set, I am submitting a form containing XML via JavaScript to an external web page that returns some XML with a needed Ticket Number. Thus, the user will always see this Ticket Number in the context of the header & instructions and the footer.

With that as background, is there a way to be able to read and capture the data that is displayed in the 3rd framed window from another window so that I can write this Ticket Number into the database table's record? In general, if I have any kind of window that executes an external web page that provides info such as a ticket number, can I capture that information from some other window so that I can use it and update my record with it?
dwoolley3Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kim WalkerWeb Programmer/TechnicianCommented:
Theoretically, if all the pages are from the same domain, you can traverse the DOM from one iFrame to another. Javascript in iFrame1 can access the parent which can access the document in iFrame2. If iFrame2 contains a form named "someform" you could access it like.
var iframe2 = parent.document.getElementById('iframe2');
var someFormIniFrame2 = iframe2.document.someform;

Open in new window

Again, this is theoretical. I have often accessed the parent from within the iFrame and the iFrame from the parent, but never from iFrame to iFrame. Also, I must reiterate that they must be in the same domain. Browser security appropriately prevents pages in one domain from accessing pages from another domain.
0
dwoolley3Author Commented:
That is a good response. So, if one of those frames starts out as an html page within the domain and then redirects to an external page (e.g. www.cnn.com), can other frame pages access the data from this other page? Sounds like the browser will not allow it for security reasons.
0
Kim WalkerWeb Programmer/TechnicianCommented:
That is correct. You would not be able to access the contents of the external page from a page in your own domain.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dwoolley3Author Commented:
Thank you for your answer and for your discussion on Frames.
As a result, I abandoned my initial design, and I have successfully rewritten things so that I am able to use the Web Service and Web Methods of the external Web application to perform a process and to obtain its results for posting in my ASP.NET web site.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.