Stores jQuery.ajaxSettings.isLocal locally at load time so that any change to it...
[jquery.git] / test / localfile.html
index 8021631..b354612 100644 (file)
 </head>
 
 <body>
 </head>
 
 <body>
+       <h1>jQuery Local File Test</h1>
+       <ul>
+               <li>
+                       Access this file using the "file:" protocol.
+               </li>
+               <li>
+                       Two lines must appear below.
+               </li>
+               <li>
+                       Opera will fail at detecting errors, it's a known issue.
+               </li>
+       </ul>
        <script>
        <script>
-       jQuery.ajax( "data/badjson.js" , {
-               dataType: "text"
-       }).success(function() {
-               $( "<div/>" ).text( "Success OK" ).appendTo( "body" );
-       });
-       jQuery.ajax( "data/doesnotexist.ext" , {
-               dataType: "text"
-       }).error(function() {
-               $( "<div/>" ).text( "Error OK" ).appendTo( "body" );
-       });
+               jQuery.ajax( "data/badjson.js" , {
+                       dataType: "text"
+               }).success(function() {
+                       jQuery( "<div/>" ).text( "Success OK" ).appendTo( "body" );
+               });
+               jQuery.ajax( "data/doesnotexist.ext" , {
+                       dataType: "text"
+               }).error(function() {
+                       jQuery( "<div/>" ).text( "Error OK" ).appendTo( "body" );
+               }).success(function() {
+                       if ( jQuery.browser.opera ) {
+                               jQuery( "<div/>" ).text( "Error Fail (Opera)" ).appendTo( "body" );
+                       }
+               });
        </script>
 </body>
\ No newline at end of file
        </script>
 </body>
\ No newline at end of file