-
function synchronous_ajax(){
-
var ajax = null;
-
if(typeof ActiveXObject!='undefined') ajax = new ActiveXObject("Microsoft.XMLHTTP");
-
else if(typeof XMLHttpRequest!='undefined') ajax = new XMLHttpRequest();
-
else{alert('Ajax is not support!!!!!');return;}
-
-
alert('Yahoo: ' + ajax);
-
ajax.open("GET","http://www.google.co.in/",false);
-
ajax.send(null);
-
alert(ajax.status);
-
}
It's working fine in IE 6 but whenever i am trying to run it in Mozilla then it shows me that ajax.open permission denied.
Could you please help me to figure out why it's happening?
Debasis Jana
10 2324 acoder 16,027
Recognized Expert Moderator MVP
Permission is denied because it's from a different domain.
Permission is denied because it's from a different domain.
Then how it's is possible with IE.
I think IE does not check this.
Debasis Jana
acoder 16,027
Recognized Expert Moderator MVP
Perhaps you're testing locally in IE?
Perhaps you're testing locally in IE?
Locally Test means?
I am simply wrote a HTML file having script and that Ajax call is being called on an event. I am not getting you how you meant Locally Test? :-)
rnd me 427
Recognized Expert Contributor
local = running from eg; c:\docs\mypage. htm in IE6.
its a fluke that it works. micro$oft has changed thier minds (to agree with everyone else that this is bad), and done everything they can to make sure it doesn't happen anymore.
something like a service pack can/will/should kill it at anytime.
enjoy it while it lasts, it wont happen again.
Perhaps you're testing locally in IE?
So Ajax call can't be done to different Domain.
acoder 16,027
Recognized Expert Moderator MVP
Well, you can make a cross-domain request, but either you need to use a web proxy, or you use JSON, or dynamic script tags. There are other ways too. Firefox allows cross-domain requests with privileges.
Well, you can make a cross-domain request, but either you need to use a web proxy, or you use JSON, or dynamic script tags. There are other ways too. Firefox allows cross-domain requests with privileges.
How to use proxy in Code?
Or should i be using it somewhere else?
One more thing Acoder, what is JSON?
Cud u clarify me a bit? :-)
Debasis Jana
acoder 16,027
Recognized Expert Moderator MVP This link should help. Basically, you have a proxy on your web server which passes the request and receives the response from the other server and passes it back to your script. As for JSON, search for it. It's an alternative to XML.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: keyofdminor |
last post by:
Folks,
Short version:
Has anyone tried a synchronous call ("SJAX") to a server with the
Prototype library? I'm curious if there is a bug in the library
(possible) or if I am making mistake (probable).
Longer version:
|
by: AECL_DEV |
last post by:
Hello Everyone,
Ive seen alot of people saying that the best way to AJAX Validate a form is
through the submit button, because validation should be synchronous. Im
wondering, is there any good way to validate a form field by field like AJAX
would do, but to keep it synchronous? i.e. one action, one validation.
Thanks,
|
by: Prasad |
last post by:
Hi all!
I am trying to access a page through Synchronous Ajax request in
mozilla firefox
I could not get the response ..
After the requset is sent , "onreadystatechange" function is not being
called .. (it does mean that State is not changing ..)
<script>
var req = new XMLHttpRequest();
req.open('GET', '_temp_delete.html', false);
|
by: geevaa |
last post by:
http://www.phpbuilder.com/columns/kassemi20050606.php3
XMLHttpRequest and AJAX for PHP programmers
James Kassemi
Introduction:
Although the concept isn't entirely new, XMLHttpRequest technology is
implemented on more sites now than ever. Compatibility is no longer an
issue (IE, Mozilla and Opera all support it), and the benefits to
using it are amazing. There are too many PHP programmers avoiding any
|
by: HugeBob |
last post by:
Hi All,
I've got a question about Asynchronous vs Synchronous mode with the
XMLHttpRequest object. What are the ramifications of using one mode
vs the other? If the script uses Asynchronous mode, it sounds as if a
thread retrieves the data from the supplied URL and the JS function
that called the open() and send() methods continues on. Where as
using Synchronous mode the method that called open() and send() waits
until the data from...
| |
by: Jason |
last post by:
Hello,
I am using ASP.NET Ajax on the web site I work on and I was just
wondering if anyone knows of a way to use the PageMethods to be
synchronous or to at lease be able to return a value instead of always
having to use the callback.
I can't think of any way to do it but I though maybe someone else may
know.
|
by: Simon |
last post by:
Hi All,
An experiment i'm doing requires requires a synchronous cross-domain
request, without using a proxy. I wondered if anyone had any ideas to
help me achieve this.
Below is what I have tried, including my conclusions/assumptions
(which i'll happily be corrected on if it solves my problem!):
The requirement not to use a proxy means I can't use the synchronous
|
by: germ |
last post by:
doing a simple page webmethod call an a page via PageMethods works fine in
ie7 & opera9
the same call on firefox ( and I assume netscape ) generates the following
error :
Error: " nsresult: "0x80040111
(NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
http://hgha.gerzio.ca/ScriptResource.axd?d=3Ot8FdrYMQ58gwjNF6tbd8V5YtBKDtb8a6qI5cjRJWaZBQhYu2jjDRnc7N0IverhgY8x7LACpAIvqLPvNyERF0ui1Tz1p-s2eu0h41S_qMA1&t=633179517344763787
::...
|
by: ng01 |
last post by:
In AjaxPro, if you leave out the Callback parameter, it becomes a
synchronous call. Is it possible to perform a synchronous call with
ASP.NET AJAX?
Please limit responses to the question posed...let's leave the
discussions of why not async, or what does the "A" mean for another
thread.
Thanks for any help and examples of how to do it.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
|
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,...
|
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...
|
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...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |