• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem on Cross domain XMLHTTPRequest

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks! I am going to download and take a look.

Linda
 
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic