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

x
?
Solved

JavaScript Content Grabbing

Posted on 2003-11-03
8
Medium Priority
?
438 Views
Last Modified: 2008-03-10
Okay I need to pull in some content but I can only use JavaScript.  Is there away that I can grab content from an HTML page?

Help :)
0
Comment
Question by:codeSmoker03
[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
8 Comments
 
LVL 11

Accepted Solution

by:
Zontar earned 252 total points
ID: 9676842
If it's on a different domain, then the answer is No.

It's a breeze with PHP, though, and I imagine the same thing is true for ASP or Perl.
0
 
LVL 75

Assisted Solution

by:Michel Plungjan
Michel Plungjan earned 248 total points
ID: 9677448
and if it is from your harddisk, you can rename the page with extension .hta and it will work too.
0
 

Expert Comment

by:shyam619
ID: 9677898
Use an invisible iFrame with the source for the iFrame set to the HTML page from where you want to grab the content. There is a workaround to get over the cross - domain issue too.
var frameElem = document.getElementsByTagName("IFRAME")[0];
var frameWnd = window.frames[0];
oHtml = frameElem.Document.body.outerHTML;

etc...
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 11

Expert Comment

by:Zontar
ID: 9678124
outerHTML is MSIE only.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 9678356
So is HTA

Only way to do cross domain scripting in Netscape/mozilla is with a signed script
0
 

Author Comment

by:codeSmoker03
ID: 9678376
Its on the same server, I'm pulling from what I believe is a perl script (havent been given all the information yet).

I have written two scripts one in ASP and one in PHP for snagging web content, but was told that the servers dont support either language, ASP i can understand, but PHP.
0
 
LVL 16

Expert Comment

by:jaysolomon
ID: 10346779
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: Zontar {http:#9676842} & mplungjan {http:#9677448}

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jAy
EE Cleanup Volunteer
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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