Solved

screen scraping from parent screen in asp

Posted on 2010-11-30
5
280 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
TimeZone, day light savings, Sql server, asp.net 6 37
Function after success of Jquery/AJAX action 9 27
Weighted Randomizing 6 29
Html Table looping 4 25
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

789 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