Connecting Tech Pros Worldwide Help | Site Map

3rd party page access from JavaScript. Is this possible?

  #1  
Old November 20th, 2008, 12:35 PM
Mike Harrison
Guest
 
Posts: n/a
Hi, is it possible to do something like this using JavaScript?

My page should prompt the user for a 3rd party URL. It will then
validate this URL, request the page, analyse it and update the main
page with the results of the analysis.

I can load the 3rd party page into an iframe no problem, but I'm
unable to access the document source because it's come from a
different domain. This domain is out of my control.

Is there any way to do this using client side technology? I realise I
could do this on the server and update the page using AJAX, but I
specifically need the client to request the page, not the server.

Is there another angle I could approach this from? I just need read-
only access to the page source, which will be standard HTML. The page
itself doesn't need to be displayed to the user.

Many thanks.
  #2  
Old November 20th, 2008, 12:45 PM
David Mark
Guest
 
Posts: n/a

re: 3rd party page access from JavaScript. Is this possible?


On Nov 20, 7:33*am, Mike Harrison <mjh...@yahoo.co.ukwrote:
Quote:
Hi, is it possible to do something like this using JavaScript?
>
My page should prompt the user for a 3rd party URL. It will then
validate this URL, request the page, analyse it and update the main
page with the results of the analysis.
>
I can load the 3rd party page into an iframe no problem, but I'm
unable to access the document source because it's come from a
different domain. This domain is out of my control.
>
Is there any way to do this using client side technology? I realise I
No. I think IE has a security setting to explicitly allow it, but it
will be hard to get your users to set it.
Quote:
could do this on the server and update the page using AJAX, but I
Or you could do it on the server and not update the page using AJAX.
See the W3C validator for an example.
Quote:
specifically need the client to request the page, not the server.
Why?

[snip]
  #3  
Old November 20th, 2008, 03:35 PM
Bart Van der Donck
Guest
 
Posts: n/a

re: 3rd party page access from JavaScript. Is this possible?


Mike Harrison wrote:
Quote:
Hi, is it possible to do something like this using JavaScript?
>
My page should prompt the user for a 3rd party URL. It will then
validate this URL, request the page, analyse it and update the main
page with the results of the analysis.
>
I can load the 3rd party page into an iframe no problem, but I'm
unable to access the document source because it's come from a
different domain. This domain is out of my control.
>
Is there any way to do this using client side technology? I realise I
could do this on the server and update the page using AJAX, but I
specifically need the client to request the page, not the server.
>
Is there another angle I could approach this from? I just need read-
only access to the page source, which will be standard HTML. The page
itself doesn't need to be displayed to the user.
You might be interested in Ajax Cross Domain:

http://www.ajax-cross-domain.com/

It would be dangerous to allow any URI from the user, because the
responsability for the arbitrary requests will be laid at the server
(e.g. Spam).

Hope this helps,

--
Bart
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
iFrame Monitoring on Server Ben answers 5 July 31st, 2006 02:05 PM
Collecting different execution statistics of C++ programs romixnews@googlemail.com answers 17 April 13th, 2006 08:55 AM
Hide Java Script kpg answers 34 November 19th, 2005 11:09 AM
No Netscape or IE 4.x support?? rez answers 9 July 20th, 2005 11:40 AM