Solved

screen scraping from parent screen in asp

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

831 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