Link to home
Start Free TrialLog in
Avatar of TechMonster
TechMonster

asked on

Javascript to read table data in a Page Viewer Webpart

Using Sharepoint 2010.. Have a webpage being displayed using the Page Viewer Webpart.  Within the page is a table with data which is what I am trying to read.  i have a simple javascipt which sees the IFrame container but no data within it.    Need help..help,..help....

The javascript file is located in another list which I pull using the CEWP on the same page.  

Thanks.

Avatar of chapmanjw
chapmanjw
Flag of United States of America image

If the page in the iframe is on the same domain name (site) as the parent page, you can use some jQuery to interact with the contents of the iframe page.  See this article for an example: http://simple.procoding.net/2008/03/21/how-to-access-iframe-in-jquery/

 $('#iframeID').contents().find('#someID').html();

Open in new window


If the iframe page is on a different domain than the parent page, you will run into cross-site scripting issues and will be blocked by most browsers.
Avatar of TechMonster
TechMonster

ASKER

THe page is on a different domain.  Is there any solution for it?
ASKER CERTIFIED SOLUTION
Avatar of chapmanjw
chapmanjw
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Though the Proxy solution will work I was hoping for a easier solution using Javascript or other language to read off the screen.  I do not have access to the other server the data is coming from.  As of today I have not found a solution which will work for me.  

Thanks.