Solved

Disabling AJAX support in Browser

Posted on 2006-10-22
5
616 Views
Last Modified: 2008-01-09
Hello,

I am working an a script that uses AJAX if available, but otherwise uses a refresh.

I want to test it, but all my browsers support AJAX.....

Is there a way to disable XMLHttpRequest in my browsers, or in some other way make my browser support JavaScript but not AJAX?

Thanks!
0
Comment
Question by:hankknight
5 Comments
 
LVL 49

Assisted Solution

by:Ryan Chong
Ryan Chong earned 75 total points
ID: 17784250
>>Is there a way to disable XMLHttpRequest in my browsers, or in some other way make my browser support JavaScript but not AJAX?

simply set a js variable when you're debugging your scripts, so that it ALWAYS will not execute the AJAX portion, like this:

<script language="javascript">

//Variable to set during debugging
var isDisableAJAX = true;

if (isDisableAJAX) {
   //do whatever..
} else {
   //do XMLHttpRequest..
}

</script>


else you may really think to uninstall the XMLHttpRequest component from your PC, but I think it's not worth to try with. Hope this makes sense to you.
0
 
LVL 13

Assisted Solution

by:jeebukarthikeyan
jeebukarthikeyan earned 75 total points
ID: 17784333
hi,

try disabling javascript and try

b u d d h a
0
 
LVL 41

Accepted Solution

by:
HonorGod earned 300 total points
ID: 17784614
If you are using something other than IE, you might try creating your own (XMLHttpRequest "object"), so when an attempt is made to
create an object, it won't allow Ajax to be performed.

0
 
LVL 12

Assisted Solution

by:str_kani
str_kani earned 50 total points
ID: 17786897
check this out...

 if (Ajax.getTransport()) {
  // Do Ajax...  Or save to a cookie..
  // Or even to the db and serve content accordingingly in the future..
 }

http://forum.openrico.org/topic/421
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 17805757
Thanks for the 'A'
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now