473,480 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

AJAX Mash-up Sites?

My research I did a while ago showed there was no possibility to get
web page content from a third-party website with AJAX only, without
using a server side technology. Now I have to re-investigate this case
and look for a workaround, perhaps, to allow client side to get the
content of the external page, living on another server. In case you
are wondering, there is no content stealing: both parties agree to
exchange data.
Please, advise if you know of any examples, links or suggestion as to
how a client can request external page content.
Thanks.

Sep 26 '07 #1
4 1249
On Sep 26, 4:37 pm, VUNETdotUS <vunet...@gmail.comwrote:
My research I did a while ago showed there was no possibility to get
web page content from a third-party website with AJAX only, without
using a server side technology. Now I have to re-investigate this case
and look for a workaround, perhaps, to allow client side to get the
content of the external page, living on another server. In case you
are wondering, there is no content stealing: both parties agree to
exchange data.
If the third party can be trusted you can have them provide the data
as a piece of JavaScript, and pass data to them in the query string:

<script type="text/javascript">
function myFunction(third_party_code) {
// etc
}
</script>
<script src="http://example.com/foo/?hello=world">
// which would contain something like:
myFunction({ foo: 'bar', baz: [1,2,3,4] });
</script>

The script element that sourced the third party data could be
dynamically generated.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

Sep 26 '07 #2
On Sep 26, 11:37 am, VUNETdotUS <vunet...@gmail.comwrote:
My research I did a while ago showed there was no possibility to get
web page content from a third-party website with AJAX only, without
using a server side technology. Now I have to re-investigate
this case

That's not true.
and look for a workaround, perhaps, to allow client side to get the
content of the external page, living on another server. In case you
are wondering, there is no content stealing: both parties agree to
exchange data.
Please, advise if you know of any examples, links or suggestion as to
how a client can request external page content.
The same way it requests any other content. It only fails if a user's
browser settings restrict cross-domain requests. Since this may rule
it out for your particular application, you can use dynamically
created script elements as described in a previous post.

Sep 26 '07 #3
VUNETdotUS wrote:
My research I did a while ago showed there was no possibility to get
web page content from a third-party website with AJAX only, without
using a server side technology. Now I have to re-investigate this case
and look for a workaround, perhaps, to allow client side to get the
content of the external page, living on another server. In case you
are wondering, there is no content stealing: both parties agree to
exchange data.
Please, advise if you know of any examples, links or suggestion as to
how a client can request external page content.
Thanks.
Hi,

As you have seen in the other responses, it will be tricky: changing
policy in browser, or using an iframe.
Which brings me to: WHY do you avoid serverside scripting?
Getting a random page via AJAX is simple WITH serverside scripting.

In PHP it would be simple as:

<?php
$requestedPage = $_POST["requestedpage"];
echo file_get_contents($requestedPage);
?>

What is wrong with a little serverside help?

Regards,
Erwin Moller
Sep 27 '07 #4
On Sep 27, 10:57 am, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:
VUNETdotUS wrote:
My research I did a while ago showed there was no possibility to get
web page content from a third-party website with AJAX only, without
using a server side technology. Now I have to re-investigate this case
and look for a workaround, perhaps, to allow client side to get the
content of the external page, living on another server. In case you
are wondering, there is no content stealing: both parties agree to
exchange data.
Please, advise if you know of any examples, links or suggestion as to
how a client can request external page content.
Thanks.

Hi,

As you have seen in the other responses, it will be tricky: changing
policy in browser, or using an iframe.
Which brings me to: WHY do you avoid serverside scripting?
Getting a random page via AJAX is simple WITH serverside scripting.

In PHP it would be simple as:

<?php
$requestedPage = $_POST["requestedpage"];
echo file_get_contents($requestedPage);
?>

What is wrong with a little serverside help?

Regards,
Erwin Moller
It is a very high traffic problem.

Sep 27 '07 #5

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

Similar topics

11
2313
by: Yarco | last post by:
I want to use "Ajax" to create my web for hobby. But i don't know whether "Ajax" is mature... And what about with php? Someone have experience on it? ....
0
1820
by: melledge | last post by:
Ajax Developers' Day added to XTech 2006 agenda XTech 2006 - 17-19 May - Hotel Grand Krasnopolsky - Amsterdam, The Netherlands
10
6283
by: Steve | last post by:
I need to build a very dynamic client and would be interested in knowing the pros and cons of using JSF and Ajax to accomplish this. Thanks. Steve
7
1484
by: Thirsty Traveler | last post by:
Peter Bromberg has an interesting article eggheadcafe discussing AJAX libraries. He prefers ANTHEM.NET over AJAX.NET because it doesn't break the stateful page model. Our developers are currently...
0
1801
by: melledge | last post by:
Ajax Developers' Day to Kick Off XTech 2006 Conference Industry experts offer insight into next generation of the Web ALEXANDRIA, VIRGINIA, USA - April 25, 2006 - In response to the rapidly...
10
4388
by: celoftis | last post by:
Using VS 2005: This morning, following the instructions here: http://ajax.asp.net/docs/overview/InstallingASPNETAJAX.aspx, I installed ASP.NET AJAX on my WinXP Pro development machine. Following...
0
2323
by: Free Ebooks | last post by:
81 AJAX and 24 JavaScript Ebooks Here are some of the AJAX topics and areas covered by these ebooks: Rails and AJAX Building Ajax Web Applications Creating Ajax Web Pages Ajax Patterns Ajax...
2
2244
by: soni2926 | last post by:
hi, does anyone know of any good books on ajax and asp.net, one that teaches ajax itself before jumping in atlas? I wanted to get an understanding of ajax and how to use it, most books i've seen...
1
3389
by: shaunwo | last post by:
I'm an AJAX / DOM Novice (at best) and trying to figure out how to write the value to a couple input fields. I don't remember exactly where I got the ajax.js file I'm using from (went to the website...
6
1591
by: Scott M. | last post by:
What is the version number of AJAX when we talk about ASP .NET AJAX in VS 2008?
0
6904
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...
0
7076
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...
1
6730
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...
0
6873
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...
0
5321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2990
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...
0
2976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
174
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...

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.