Solved

Disabling AJAX support in Browser

Posted on 2006-10-22
5
618 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 50

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
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…

809 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