Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Javascript to read table data in a Page Viewer Webpart

Posted on 2011-09-09
4
Medium Priority
?
248 Views
Last Modified: 2012-05-12
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.

0
Comment
Question by:TechMonster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 21

Expert Comment

by:chapmanjw
ID: 36514858
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.
0
 

Author Comment

by:TechMonster
ID: 36515984
THe page is on a different domain.  Is there any solution for it?
0
 
LVL 21

Accepted Solution

by:
chapmanjw earned 1500 total points
ID: 36516444
You can proxy the other site on your site. I have a sample here http://www.sharepointjohn.com/aspnet-proxy-page-cross-domain-requests-from-ajax-and-javascript/
0
 

Author Closing Comment

by:TechMonster
ID: 36709739
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.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

This article discusses how to create an extensible mechanism for linked drop downs.
In case you ever have to remove a faulty web part from a page , add the following to the end of the page url ?contents=1
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

670 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