As a quick test I tried to enter an invalid file name ".test". The alert box comes up, and when you click "OK" to correct it, the onBlur handler puts the alert box back up.
Oct 25, 1998, 6:53 PM
Administrator (9387 posts)
Oct 25, 1998, 6:53 PM
Post #4 of 13
Views: 9736
I tried with IE (although it was version 4.72.3110) and couldn't produce the error.
Do you mean you typed in ".test" clicked Create Directory, then got the error message. You then clicked OK and got the error message right away again? You should be able to hit OK, then fix the name and hit Create.
Cheers,
Alex
Do you mean you typed in ".test" clicked Create Directory, then got the error message. You then clicked OK and got the error message right away again? You should be able to hit OK, then fix the name and hit Create.
Cheers,
Alex
Oct 25, 1998, 10:49 PM
New User (1 post)
Oct 25, 1998, 10:49 PM
Post #5 of 13
Views: 9721
Alex,
I too noticed that if there is a "." before file names or directories it would either give me a file error or would not allow me
modify or delete the file or directory.
<especially if your deleting a .htaccess file as an example to delete a directory>
My FTP program handles this problem well.
Currently running Communicator 4.04 going to 4.07 later this week.
I also noticed that if I upload a file, the program names the file the same as the directory size
ex: 499 kb filename = 499
To add to this <grins> the file is not uploaded but does show up as 0 KB using File Manger. Clicking on that file shows nothing in it. FTP Program reports the same.
Suggestions??
Silver
I too noticed that if there is a "." before file names or directories it would either give me a file error or would not allow me
modify or delete the file or directory.
<especially if your deleting a .htaccess file as an example to delete a directory>
My FTP program handles this problem well.
Currently running Communicator 4.04 going to 4.07 later this week.
I also noticed that if I upload a file, the program names the file the same as the directory size
ex: 499 kb filename = 499
To add to this <grins> the file is not uploaded but does show up as 0 KB using File Manger. Clicking on that file shows nothing in it. FTP Program reports the same.
Suggestions??
Silver
Oct 25, 1998, 11:55 PM
Novice (32 posts)
Oct 25, 1998, 11:55 PM
Post #6 of 13
Views: 9731
What happens is when I enter an invalid filename like ".test" and click on "Create file", I then receive the error alert box message "Invalid filename. Please re-enter." But when I click on "OK" to clear the alert box so I can retype the filename, the alert box comes back up with the same error message. It does this repeatedly for about 10 clicks on the "OK" button, then works as it should, and I'm able to correct the filename.
Nov 6, 1998, 5:30 PM
Novice (16 posts)
Nov 6, 1998, 5:30 PM
Post #8 of 13
Views: 9713
Haven't quite figured out the javascript problem. I can't seem to reproduce the problem on Goassamers test site. *STRANGE*. I'll read through the specific docs on netscape's site. Problem is that the textbox looses focus after the field.select(). I'm not sure why just yet though. Anyone fix this yet?
-Cheers,
RJW
[This message has been edited by QDeath (edited 11-07-98).]
-Cheers,
RJW
[This message has been edited by QDeath (edited 11-07-98).]
Nov 9, 1998, 6:23 AM
Novice (16 posts)
Nov 9, 1998, 6:23 AM
Post #11 of 13
Views: 9718
As a temp fix for now, until I solve this problem, use:
if (field) {
field.value = '';
field.focus();
field.select();
}
This will delete whatever the user types in the textbox. It would be nice to let the user CHANGE their entry instead of retyping, the whole thing but . . . it works for now, until another fix is posted, I'll still continue to look. *ARGH!* This fixes the problem under Netscape as well as under The version of Internet Explorer that Wayne was using. (I happened to have the same version of IE).
if (field)
field.focus();
will also work, note that in this case, the field is not reselected, so the user will have to click on the textbox and retype there choice, as where in the other temp fix, the user can just type as the textbox is already selected.
Anyways... this fix will have to do until I figure out how to fix this problem of loosing focus() :,-(.
[This message has been edited by QDeath (edited 11-09-98).]
if (field) {
field.value = '';
field.focus();
field.select();
}
This will delete whatever the user types in the textbox. It would be nice to let the user CHANGE their entry instead of retyping, the whole thing but . . . it works for now, until another fix is posted, I'll still continue to look. *ARGH!* This fixes the problem under Netscape as well as under The version of Internet Explorer that Wayne was using. (I happened to have the same version of IE).
if (field)
field.focus();
will also work, note that in this case, the field is not reselected, so the user will have to click on the textbox and retype there choice, as where in the other temp fix, the user can just type as the textbox is already selected.
Anyways... this fix will have to do until I figure out how to fix this problem of loosing focus() :,-(.
[This message has been edited by QDeath (edited 11-09-98).]
Nov 9, 1998, 7:34 AM
Novice (16 posts)
Nov 9, 1998, 7:34 AM
Post #12 of 13
Views: 9715
Okay, I have what I think is the BEST solution to this problem. This solution, will tell the user which character is invalid and fix the input for them :-)!
Since spacing doesn't seem to work well and the pre tag doesnt't work, bare with this:
function validateFileEntry(validString, field) {
var isCharValid = true;
var i, invalidChar;
for (i=0; i<validString.length; i++) {
if (validString.charAt(0) == '.') {
isCharValid = false;
validString = validString.substr(1, validString.length-1);
i = validString.length;
}
if (validateCharacter(validString.charAt(i)) == false) {
isCharValid = false;
invalidChar = validString.charAt(i);
validString = validString.substr(0, i) + validString.substr(i+1, validString.length-1);
i = validString.length;
}
}
if (i < 1) { return false; }
if (isCharValid == false) {
if (invalidChar) alert("Invalid filename. Can't contain '" + invalidChar + "'. Filename adjusted.");
else alert('Invalid filename. Filename adjusted.');
if (field) {
field.value = validString;
field.focus();
field.select();
}
return false;
}
return true;
}
[This message has been edited by QDeath (edited 11-09-98).]
Since spacing doesn't seem to work well and the pre tag doesnt't work, bare with this:
function validateFileEntry(validString, field) {
var isCharValid = true;
var i, invalidChar;
for (i=0; i<validString.length; i++) {
if (validString.charAt(0) == '.') {
isCharValid = false;
validString = validString.substr(1, validString.length-1);
i = validString.length;
}
if (validateCharacter(validString.charAt(i)) == false) {
isCharValid = false;
invalidChar = validString.charAt(i);
validString = validString.substr(0, i) + validString.substr(i+1, validString.length-1);
i = validString.length;
}
}
if (i < 1) { return false; }
if (isCharValid == false) {
if (invalidChar) alert("Invalid filename. Can't contain '" + invalidChar + "'. Filename adjusted.");
else alert('Invalid filename. Filename adjusted.');
if (field) {
field.value = validString;
field.focus();
field.select();
}
return false;
}
return true;
}
[This message has been edited by QDeath (edited 11-09-98).]
Nov 11, 1998, 8:47 AM
Novice (16 posts)
Nov 11, 1998, 8:47 AM
Post #13 of 13
Views: 9725
The below is straight from developer.netscape.com! I think this puts this problem to bed. GOODNIGHT! Tis a known bug . . .
>When focus is given from a form field to the
>top level window, then back to the form
>element, the form's onFocus handler does
>not always get called.
I would suspect they are having problems with focus() as well as onFocus. This problem seems to be fixed in later versions of MSIE, but not in Netscape.
volia! BTW, I've tested my solution on many browsers, many versions and it works on em all :-)
-Cheers,
RJW
[This message has been edited by QDeath (edited 11-11-98).]
>When focus is given from a form field to the
>top level window, then back to the form
>element, the form's onFocus handler does
>not always get called.
I would suspect they are having problems with focus() as well as onFocus. This problem seems to be fixed in later versions of MSIE, but not in Netscape.
volia! BTW, I've tested my solution on many browsers, many versions and it works on em all :-)
-Cheers,
RJW
[This message has been edited by QDeath (edited 11-11-98).]