Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 439
  • Last Modified:

JavaScript Content Grabbing

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
codeSmoker03
Asked:
codeSmoker03
2 Solutions
 
ZontarCommented:
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
 
Michel PlungjanIT ExpertCommented:
and if it is from your harddisk, you can rename the page with extension .hta and it will work too.
0
 
shyam619Commented:
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's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
ZontarCommented:
outerHTML is MSIE only.
0
 
Michel PlungjanIT ExpertCommented:
So is HTA

Only way to do cross domain scripting in Netscape/mozilla is with a signed script
0
 
codeSmoker03Author Commented:
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
 
jaysolomonCommented:
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now