![]() |
| | #1 |
| unleashed Join Date: Sep 2003
Posts: 693
| Javascript: Error in FTP access Code: var req = new XMLHttpRequest();
req.open( 'GET', 'ftp://username:password@mysite.com/index.html', true );
req.onreadystatechange = function() {
if( req.readyState == 4 ) {
print( req.responseText );
}
}
req.send( null );
Code: 530 Login Incorrect Code: 550/index.html No such file or directory
__________________ source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense Last edited by alphaoide; 05-09-2005 at 07:19 PM. |
| alphaoide is offline | |
| | #2 |
| 5|-|1+|-|34|) Join Date: Aug 2001
Posts: 4,429
| You'd probably be better off asking this in a web developer community. EDIT: But AFAIK, there is no error trapping in JS. |
| ober is offline | |
| | #3 |
| Cat without Hat Join Date: Apr 2003
Posts: 8,492
| Yes, there is. Since 1.4, I think, JavaScript supports try ... catch. But it won't work in this situation, because that FTP handling is done internally. I won't even talk about the absurdity of using XMLHttpRequest to get a file that is neither XML nor retrieved over HTTP.
__________________ All the buzzt! CornedBee"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code." - Flon's Law |
| CornedBee is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| JavaScript book recommendations | neandrake | Tech Board | 2 | 04-05-2009 12:27 PM |
| Whats FTP | Stan100 | Tech Board | 13 | 01-22-2004 05:10 PM |
| Visual Studio and FTP Server... | Grayson_Peddie | Networking/Device Communication | 0 | 09-03-2003 12:31 PM |
| FTP Server :: Winsock | kuphryn | Windows Programming | 2 | 10-03-2002 07:14 PM |