Solved

Disabling AJAX support in Browser

Posted on 2006-10-22
5
619 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 51

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…

861 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