File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem on Cross domain XMLHTTPRequest

 
Linda Woodway
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

When I am trying to Post/Get a cross domain XMLHTTPRequest using AJAX, it is poping up a dialog box AT the First time after I opened IE 6.0 browser. It is saying

"this page is accessing information that is not under its control. this poses a security risk. do you want to continue"

If press "Yes", I get the response from the Request. The dialog box won't pop up again if the same cross domain Request POSTs/GETs again on the same browser.

How can I get rid of that dialog box? or is there any other way in AJAX code (JavaScript) which allows me to do cross domain without displaying this box.

I appreciate any help. I saw the similar topic in this forum.

Thanks,
A learner of JavaScript
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64204
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Study JavaScript",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64204
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No way around it. It's a security measure.

The only thing you can do is to create a server-side proxy so that your client-side code doesn't need to cross domains.
 
Linda Woodway
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much.

Could you give me any sample code or weblink to create the server side Proxy service?

Linda
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64204
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I implemented one for the web services chapter of Ajax in Practice. if you download the book's code, you'll find my implementation that uses the services of the Apache HttpClient project to implement a server-side proxy.
[ June 06, 2008: Message edited by: Bear Bibeault ]
 
Linda Woodway
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! I am going to download and take a look.

Linda
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic