Solved

screen scraping from parent screen in asp

Posted on 2010-11-30
5
276 Views
Last Modified: 2012-05-10
I have a page that is contained in a frame.  My page is asp, the frame is generated by a different site on a different server.  

If I could tell if the frame contained a certain string, that would help me determine what my page needs to do.  Is there a way to see if the 'parent' frame contains a certain string?
0
Comment
Question by:d2fox
  • 2
5 Comments
 
LVL 18

Expert Comment

by:ChetOS82
ID: 34242416
Since your parent is on a different domain than your page, this is not possible.  Cross-domain scripting security prevents you from accessing the parent page's "internals".  You will get an "access denied" error.
0
 

Author Comment

by:d2fox
ID: 34242735
Well, I was hoping I could 'read' the text, e.g. what I'm referring to is actually displayed on the parent frame.  Can't I get the parent html somehow and look for the text that I'm interested in?  I think I've done this on my own page, just not on a parent page.
0
 
LVL 18

Accepted Solution

by:
ChetOS82 earned 500 total points
ID: 34242810
No, you cannot access the parent page's html from the child (unless they are both on the same domain).

You can try and see what happens.  Use window.parent.document to access the parent page.  You could try something like alert(window.parent.document.getElementsByTagName('html')[0].innerHTML);
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 34429114
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now