Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script language="javascript" src="http://code.jquery.com/jquery-1.4.4.min.js">
- </script>
- <script language="javascript">
- /*
- * Could anyone explain why 'status' is 'success' even if you connect
- * to an invalid address? What's the correct way of handling this sort of error?
- */
- var INVALID_ADDRESS = "http://127.0.0.1:82/?"
- $(document).ready(function() {
- $('pre').append("Loading the invalid address '"+INVALID_ADDRESS+"'..");
- $.get(INVALID_ADDRESS, function(data,status) {
- $('pre').append("\nStatus: "+status);
- $('pre').append("\nData: "+data);
- });
- });
- </script>
- </head>
- <body>
- <pre>
- </pre>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement