473,651 Members | 2,466 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.
Nov 20 '08 #1
2 2241
On Nov 20, 7:33*am, Mike Harrison <mjh...@yahoo.c o.ukwrote:
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.
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.
specifically need the client to request the page, not the server.
Why?

[snip]
Nov 20 '08 #2
Mike Harrison wrote:
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
Nov 20 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1583
by: Graham Mattingley | last post by:
Hi Group, I have been building a search engine for about 9 months now of links to other site that I have admin Access to. This has been simple for me to keep mySQL record of page hits, as I admin all the sites. I now have a requirement to add 3rd party pages, that require to be able to increment counters tables on mySQL database. This is exactly the same requirement as other 3rd party counter web sites
8
4828
by: Mr. x | last post by:
Hello, I wrote a javascript, and when I open the html by the browser, I get the message : Error in page. It is about tousand lines, and I cannot figure out in a simple way, where is the line, that cause the error ? I see on other computers, a message like " ... do you wish to debug".
6
19612
by: Biguana | last post by:
Hi, Just wondering if anyone can help here. We have a site where most of the site opens in a window with no toolbars or menubar: window.open('mypage.aspx','self','toolbar=0, menubar=0, etc, etc) This is because it's a data driven site where space is at a premium and we'd rather discourage use of back, stop and refresh. The problem arises because some "view data" pages are designed to be printed and have an onclick="window.print();"...
4
2841
by: ianv2 | last post by:
Hi Is the following possible using Javascript ? I would like a page to redirect to another page if the page expiry has passed. E.G. If my questionnaireform.html page had an expiry date of July 31, if I
1
1017
by: IkBenHet | last post by:
Aldo it is something very simpel, it is not easy to find good information on this subject. For the moment we have only 1 ASP.NET page and we want that if vistors access it, this visit is logged into a database. Because we are developing the future site right now, we also want to know what browser, screensize and resolutions the visitors of our site are using. I already know that because Javascript is clientside and ASP.NET serverside,...
8
9411
by: '69 Camaro | last post by:
Perhaps I'm Googling for the wrong terms. Does anyone have links to examples of the syntax necessary to read the HTML on another Web page when that HTML is produced from JavaScript using the document.write( ) method? For a simplified example, I have two Web pages. Page 1 uses JavaScript with the following: htmlData = "<B>This is bold text.</B>"; document.write(htmlData);
6
4865
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
1
2165
by: amit | last post by:
Hi all, I'm totally new to 3rd party cookies! 1)would one please tell me what they are? 2)how to make IE to detect them? 3)how can I trick IE or FF not to see them? (if possible!)
3
1569
by: pld888 | last post by:
https://turbotaxweb.turbotaxonline.intuit.com/open/registration/SignIn.htm anyone know which 3rd party textbox this is???
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8695
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8460
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8576
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.