Re: file upload validation

2004-07-12 Thread Joe Rinehart
I don't have one handy, but you should be able to split the .value
using "\" or "/" as delimiters (depending on OS - I'd test to see
which exists first) , and take the last value in the resultant array.

-joe

- Original Message -
From: Coldfusion <[EMAIL PROTECTED]>
Date: Mon, 12 Jul 2004 08:49:34 -0500
Subject: file upload validation
To: CF-Talk <[EMAIL PROTECTED]>

Does anyone have a JS script that will

determine the length of file name for a 

file upload process?



This is only for the document name, not

the complete path and filename, so 

document.forms[0].fileupload.value will

not work.



just trying to find a script to determine the

length of file name only prior to upload.



TIA!
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: file upload validation

2004-07-12 Thread S . Isaac Dealey
> Does anyone have a JS script that will
> determine the length of file name for a
> file upload process?

> This is only for the document name, not
> the complete path and filename, so
> document.forms[0].fileupload.value will
> not work.

> just trying to find a script to determine the
> length of file name only prior to upload.

> TIA!

Well you have to start with that value...

if you're willing to resort to regular expressions in _javascript_, it
should be reasonably easy to get the file name from that point...

filename = document.forms.myform.fileupload.value;
filename = filename.replace(/^.*(\\|\/)(.*)$/,"$2");

or something to that effect.

hth

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: file upload validation

2004-07-12 Thread Coldfusion
much appreciated!!

  _  

From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 12, 2004 8:45 AM
To: CF-Talk
Subject: Re: file upload validation

> Does anyone have a JS script that will
> determine the length of file name for a
> file upload process?

> This is only for the document name, not
> the complete path and filename, so
> document.forms[0].fileupload.value will
> not work.

> just trying to find a script to determine the
> length of file name only prior to upload.

> TIA!

Well you have to start with that value...

if you're willing to resort to regular expressions in _javascript_, it
should be reasonably easy to get the file name from that point...

filename = document.forms.myform.fileupload.value;
filename = filename.replace(/^.*(\\|\/)(.*)$/,"$2");

or something to that effect.

hth

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: file upload validation

2004-07-12 Thread S . Isaac Dealey
welcome. :)

> much appreciated!!

>   _

> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 12, 2004 8:45 AM
> To: CF-Talk
> Subject: Re: file upload validation

>> Does anyone have a JS script that will
>> determine the length of file name for a
>> file upload process?

>> This is only for the document name, not
>> the complete path and filename, so
>> document.forms[0].fileupload.value will
>> not work.

>> just trying to find a script to determine the
>> length of file name only prior to upload.

>> TIA!

> Well you have to start with that value...

> if you're willing to resort to regular expressions in
> _javascript_, it
> should be reasonably easy to get the file name from that
> point...

> filename = document.forms.myform.fileupload.value;
> filename = filename.replace(/^.*(\\|\/)(.*)$/,"$2");

> or something to that effect.

> hth

> s. isaac dealey   954.927.5117

> new epoch : isn't it time for a change?

> add features without fixtures with
> the onTap open source framework
> http://www.sys-con.com/story/?storyid=44477&DE=1
>   _

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: file upload validation

2004-07-13 Thread info
> Does anyone have a JS script that will
> determine the length of file name for a
> file upload process?

> This is only for the document name, not
> the complete path and filename, so
> document.forms[0].fileupload.value will
> not work.

> just trying to find a script to determine the
> length of file name only prior to upload.

> TIA!

Well you have to start with that value...

if you're willing to resort to regular expressions in _javascript_, it
should be reasonably easy to get the file name from that point...

filename = document.forms.myform.fileupload.value;
filename = filename.replace(/^.*(\\|\/)(.*)$/,"$2");

or something to that effect.

hth

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: file upload validation

2004-07-13 Thread cfdev
much appreciated!!

  _  

From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 12, 2004 8:45 AM
To: CF-Talk
Subject: Re: file upload validation

> Does anyone have a JS script that will
> determine the length of file name for a
> file upload process?

> This is only for the document name, not
> the complete path and filename, so
> document.forms[0].fileupload.value will
> not work.

> just trying to find a script to determine the
> length of file name only prior to upload.

> TIA!

Well you have to start with that value...

if you're willing to resort to regular expressions in _javascript_, it
should be reasonably easy to get the file name from that point...

filename = document.forms.myform.fileupload.value;
filename = filename.replace(/^.*(\\|\/)(.*)$/,"$2");

or something to that effect.

hth

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: file upload validation

2004-07-13 Thread info
welcome. :)

> much appreciated!!

>   _

> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 12, 2004 8:45 AM
> To: CF-Talk
> Subject: Re: file upload validation

>> Does anyone have a JS script that will
>> determine the length of file name for a
>> file upload process?

>> This is only for the document name, not
>> the complete path and filename, so
>> document.forms[0].fileupload.value will
>> not work.

>> just trying to find a script to determine the
>> length of file name only prior to upload.

>> TIA!

> Well you have to start with that value...

> if you're willing to resort to regular expressions in
> _javascript_, it
> should be reasonably easy to get the file name from that
> point...

> filename = document.forms.myform.fileupload.value;
> filename = filename.replace(/^.*(\\|\/)(.*)$/,"$2");

> or something to that effect.

> hth

> s. isaac dealey   954.927.5117

> new epoch : isn't it time for a change?

> add features without fixtures with
> the onTap open source framework
> http://www.sys-con.com/story/?storyid=44477&DE=1
>   _

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]