Solved

Disabling AJAX support in Browser

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

920 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