cfdocument NullPointerException with form field input type = file

2013-08-02 Thread Britton Powers

We have an app that allows users to create a PDF of pages in the application. 
It uses cfdocument for this functionality.

Today a user reported they couldn't PDF one of the pages. We get this error:
coldfusion.document.spi.DocumentExportException: 
java.lang.NullPointerException. 

Other page PDF's are working fine in this application, so I removed various 
sections from the non-PDF-able page to see what specific part of the page might 
be causing the issue. The page contains an html form, and it turned out that if 
I removed one of the form controls -- a form input of type file (a file 
upload control) -- then the PDF is created successfully.

I then made a small test page with just an html form and one input field, and 
get the same error. If the field is an input type file then cfdocument won't 
make the PDF. Any other type of form input control seems fine.

We're not trying to create interactive pdf forms or anything, just a PDF image 
of a web page that happens to have a form with some controls.

This is on CF 9.0.1 on Windows Server 2008.

Has anyone seen a workaround or have any ideas? I tried setting the mime type 
and a few other things but nothing worked. 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356365
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfdocument NullPointerException with form field input type = file

2013-08-02 Thread Raymond Camden

Not that it helps - but I can confirm it. Since you can't build interactive
forms with cfdocument anyway, why not just replace type=file with
type=text before you cfdocument it?


On Fri, Aug 2, 2013 at 2:42 PM, Britton Powers bpower...@yahoo.com wrote:


 We have an app that allows users to create a PDF of pages in the
 application. It uses cfdocument for this functionality.

 Today a user reported they couldn't PDF one of the pages. We get this
 error:
 coldfusion.document.spi.DocumentExportException:
 java.lang.NullPointerException.

 Other page PDF's are working fine in this application, so I removed
 various sections from the non-PDF-able page to see what specific part of
 the page might be causing the issue. The page contains an html form, and it
 turned out that if I removed one of the form controls -- a form input of
 type file (a file upload control) -- then the PDF is created successfully.

 I then made a small test page with just an html form and one input field,
 and get the same error. If the field is an input type file then
 cfdocument won't make the PDF. Any other type of form input control seems
 fine.

 We're not trying to create interactive pdf forms or anything, just a PDF
 image of a web page that happens to have a form with some controls.

 This is on CF 9.0.1 on Windows Server 2008.

 Has anyone seen a workaround or have any ideas? I tried setting the mime
 type and a few other things but nothing worked.

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356366
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: JRun Servlet Error when submitting form input type = file

2009-02-15 Thread Todd Carpenter

 This error went away! I will try to get some more information about 
 what happened and why... J


I have the same problem, except that mine didn't go away. The simple upload 
script worked for a few weeks and then just stopped working and I got the same 
JRun error. 

It is failing on my GoDaddy shared Linux box, just like yours. It works on a 
similar Windows box.

I noticed that in your example, the TestFile returns: 
/tmp/wwwroot-tmp/neotmp40346.tmp.

I read somewhere that it is better to use the following enctype:
enctype=multipart/form-data; charset=utf-8 

which is a slightly different from the normal (and what you used): 
enctype=multipart/form-data

When I use the first one, the script doesn't get the JRun error, but my 
testFile returns: file.ext
which is the actual file name, rather than the path to the .tmp file as in your 
example.

I don't know the significance of this really. The JRun error is gone, but now I 
get a CF error on the cfftp... statement:
“Security: The requested template has been denied access to file.ext.”

This is understandable to me because CF doesn't know where to find file.ext 
(there is no path info).

So I am still quite confused. Did you learn any more about this problem? Have 
you tried the optional enctype?

Thanks for any help on this.

Todd
t...@lyonvision.com



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319366
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: JRun Servlet Error when submitting form input type = file

2009-01-15 Thread Jason Daniels
This error went away! I will try to get some more information about what 
happened and why... J


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318028
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


JRun Servlet Error when submitting form input type = file

2009-01-13 Thread Jason Daniels
I have run into an issue with a file uploader that was working since October. I 
am using shared hosting on Go Daddy, and the problem has to do with my sole 
Linux account. I have stripped out all the code that doesn't work, and I am 
making this as simple as possible - I have no idea what is happening... please 
help!

Here's the code:
-
body

cfif isdefined(FORM.btnSubmit)
cfdump var=#FORM#
/cfif

form action=test.cfm method=post enctype=multipart/form-data
input type=text name=TestText value=Test Text /
input type=file name=TestFile /
input type=submit name=btnSubmit value=Submit Text / /form

/body

When you submit this, the following appears (exactly as typed with HTML coding 
visible):

headtitleJRun Servlet Error/title/headh1500 No such file or 
directory/h1body No such file or directory/body

This can be seen at this link: www.ubcbike.net/test.cfm

The really strange part is that the same code lives at: 
www.metraworks.com/test.cfm, and it works properly... the code is identical!

I talked to GoDaddy support, and they said that they could not help me because 
it is a scripting error. I think there is something wrong on their end... I was 
using the function a little over a week ago with no issue...

Sorry if I rambled. Thanks in advance for any help.

Humbly,

Jason Daniels
ja...@metraworks.com


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317913
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CF, Safari, and No Form Variable if Input Type='File'?

2008-05-26 Thread Didgiman
Another case of RTFM, I'm afraid...

From the CF documentation: When you use a cfform tag or an HTML form tag to
submit the form with the file to be uploaded, you must specify
enctype=multipart/form-data in the tag

On Mon, May 26, 2008 at 10:56 PM, Matthew Reinbold 
[EMAIL PROTECTED] wrote:

 I've got the following simple form:
 --
 form action=index.cfm?go=Load method=post name=LoadForm
divChoose File/div
input type=file name=filename
input type=submit/
 /form
 --

 or (for those that would like to play along at home) a complete standalone
 example file:
 ===
 cfparam name=url.go default=showtheform
 cfif url.go eq Load
cfdump var=#form#
a href=index.cfmAgain?/a
 cfelse
 form action=index.cfm?go=Load method=post name=LoadForm
divChoose File/div
input type=file name=filename
input type=submit/
 /form
 /cfif
 ===

 To help debug, the result of submitting the form is a cfdump
 var=#form#cfabort /.

 If the user finds a file on IE, Firefox, etc. and submits it I see the
 resulting form structure as expected - with the filename of what's chosen.
 On Safari the result of submitting this html element results in an empty
 form structure.

 I've also been able to recreate this using the AIR app Scout browsing to
 the same app on PC (which makes sense, since Safari and AIR both are using
 the WebKit HTML engine).

 Why is ColdFusion not getting the file information? And if Safari isn't
 passing back the necessary html form field information when type = 'file'
 how do I code around that behavior?

 matthew reinbold
 Creative Principal, Vox Pop Design

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306039
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CF, Safari, and No Form Variable if Input Type='File'?

2008-05-26 Thread Will Tomlinson
 
 Why is ColdFusion not getting the file information? And if Safari 
 isn't passing back the necessary html form field information when type 
 = 'file' how do I code around that behavior?
 

Yeah, That used to catch me when I first started building file upload tools. 
The first thing you should think when building these forms is multipart 
enctype. 
If you don't, it'll constantly bite your rear and cost you lots of time.

Will 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306040
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


CF, Safari, and No Form Variable if Input Type='File'?

2008-05-26 Thread Matthew Reinbold
I've got the following simple form:
--
form action=index.cfm?go=Load method=post name=LoadForm
divChoose File/div
input type=file name=filename
input type=submit/
/form
--

or (for those that would like to play along at home) a complete standalone 
example file:
===
cfparam name=url.go default=showtheform
cfif url.go eq Load
cfdump var=#form#
a href=index.cfmAgain?/a
cfelse
form action=index.cfm?go=Load method=post name=LoadForm
divChoose File/div
input type=file name=filename
input type=submit/
/form
/cfif
===

To help debug, the result of submitting the form is a cfdump 
var=#form#cfabort /. 

If the user finds a file on IE, Firefox, etc. and submits it I see the 
resulting form structure as expected - with the filename of what's chosen. On 
Safari the result of submitting this html element results in an empty form 
structure. 

I've also been able to recreate this using the AIR app Scout browsing to the 
same app on PC (which makes sense, since Safari and AIR both are using the 
WebKit HTML engine). 

Why is ColdFusion not getting the file information? And if Safari isn't passing 
back the necessary html form field information when type = 'file' how do I code 
around that behavior?

matthew reinbold
Creative Principal, Vox Pop Design 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306038
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


using input type=file question

2004-08-12 Thread Gonzo Rock
I have a form where the user can capture a link to a file.

They click on Browse and navigate their network and point to the file they 
want to link to. (Bullet Proof browse to the file.)

When the form is submitted I capture the full path to the file with some 
_javascript_  
kinda thing.

Then I use that full path and store it so that when someone wants to visit 
the link they can ... (if they have permissions across their internal 
network to open/read the file).

The issue is that even though I am only storing the full network path name 
the file is being uploaded and then discarded.

-- Can this behavior be suppressed?

-- Is their a way that would suppress it that would not require me to 
build an equivalent browse tool that can be used across linux/windows 
clients and cfServers?

Thanks again to anyone who knows,
Gonz
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: using input type=file question

2004-08-12 Thread Ewok
as long as you're not using the enctype=multipart/form-data n your form tag, the file can't be uploaded can it?
- Original Message - 
From: Gonzo Rock 
To: CF-Talk 
Sent: Thursday, August 12, 2004 2:20 PM
Subject: using input type=file question

I have a form where the user can capture a link to a file.

They click on Browse and navigate their network and point to the file they 
want to link to. (Bullet Proof browse to the file.)

When the form is submitted I capture the full path to the file with some 
_javascript_  
kinda thing.

Then I use that full path and store it so that when someone wants to visit 
the link they can ... (if they have permissions across their internal 
network to open/read the file).

The issue is that even though I am only storing the full network path name 
the file is being uploaded and then discarded.

-- Can this behavior be suppressed?

-- Is their a way that would suppress it that would not require me to 
build an equivalent browse tool that can be used across linux/windows 
clients and cfServers?

Thanks again to anyone who knows,
Gonz
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Field validation for an input type file.

2003-02-17 Thread Darren Adams
Hello All,

Just wondered if anyone had a good way to check if a user has selected
anything for a file field.

Basically,  the file field is the only field in the form but, when I try
to check the value it is an empty string.  However, if I do cfif file
NEQ  the server just tells me that complex types cannot be converted
etc...

When I cfdump the attributes scope the value for the file field is
[empty string].

Any ideas ?


Cheers,

Daz


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4




RE: Field validation for an input type file.

2003-02-17 Thread Darren Adams
Ok,  got it sorted.

Set another variable = file field and check that if that variable = .

Cheers,

Darren

 -Original Message-
 From: Darren Adams [mailto:[EMAIL PROTECTED]]
 Sent: 17 February 2003 14:41
 To: CF-Talk
 Subject: Field validation for an input type file.
 
 Hello All,
 
 Just wondered if anyone had a good way to check if a user has selected
 anything for a file field.
 
 Basically,  the file field is the only field in the form but, when I
try
 to check the value it is an empty string.  However, if I do cfif
file
 NEQ  the server just tells me that complex types cannot be
converted
 etc...
 
 When I cfdump the attributes scope the value for the file field is
 [empty string].
 
 Any ideas ?
 
 
 Cheers,
 
 Daz
 
 
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4




MAC blank input type=file

2003-01-16 Thread David Brown
We have a simple web page that allows users to upload files to our web
server via input type=file.  In edit mode if the user leaves the input
type=file field blank, then we don't try to use cfile to upload a new file
since the edit is only text changes. All works fine when using a PC, but if
the user is on a MAC the type=file is not blank.  Even though the user never
browsed to a file, the form.field is not null.

I could put a check box on the form page that a mac user could use to
identify if the field is blank.

Any have another idea.



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4




RE: MAC blank input type=file

2003-01-16 Thread Ben Doom
This is the result of the same bloody IE bug that screws up every
multipart/mime form on IE on the Mac.  The return field is /not/ empty -- it
contains a newline.

Trim everything if you are returning from a multipart/mime form.


--  Ben Doom
Programmer  General Lackey
Moonbow Software, Inc

: -Original Message-
: From: David Brown [mailto:[EMAIL PROTECTED]]
: Sent: Thursday, January 16, 2003 3:07 PM
: To: CF-Talk
: Subject: MAC blank input type=file
:
:
: We have a simple web page that allows users to upload files to our web
: server via input type=file.  In edit mode if the user leaves the input
: type=file field blank, then we don't try to use cfile to upload
: a new file
: since the edit is only text changes. All works fine when using a
: PC, but if
: the user is on a MAC the type=file is not blank.  Even though the
: user never
: browsed to a file, the form.field is not null.
:
: I could put a check box on the form page that a mac user could use to
: identify if the field is blank.
:
: Any have another idea.
:
:
:
: 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4




Re: MAC blank input type=file

2003-01-16 Thread David Brown
Hmm, thanks for the reply.  But when doing a cfoutput on the action page
the below is seen on the mac user.
C:\DOCUME~1\CFServer\LOCALS~1\Temp\ACF12.tmp

But as stated first time, the user did not even click on browse button to
locate a file to upload.  There was only an edit to TEXT input fields.

- Original Message -
From: Ben Doom [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 3:12 PM
Subject: RE: MAC blank input type=file


 This is the result of the same bloody IE bug that screws up every
 multipart/mime form on IE on the Mac.  The return field is /not/ empty --
it
 contains a newline.

 Trim everything if you are returning from a multipart/mime form.


 --  Ben Doom
 Programmer  General Lackey
 Moonbow Software, Inc

 : -Original Message-
 : From: David Brown [mailto:[EMAIL PROTECTED]]
 : Sent: Thursday, January 16, 2003 3:07 PM
 : To: CF-Talk
 : Subject: MAC blank input type=file
 :
 :
 : We have a simple web page that allows users to upload files to our web
 : server via input type=file.  In edit mode if the user leaves the input
 : type=file field blank, then we don't try to use cfile to upload
 : a new file
 : since the edit is only text changes. All works fine when using a
 : PC, but if
 : the user is on a MAC the type=file is not blank.  Even though the
 : user never
 : browsed to a file, the form.field is not null.
 :
 : I could put a check box on the form page that a mac user could use to
 : identify if the field is blank.
 :
 : Any have another idea.
 :
 :
 :
 :
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4




RE: MAC blank input type=file

2003-01-16 Thread Kelly Tetterton
There are 2 things to keep in mind with Mac IE users:

1) mac IE will append a trailing space to *every* form field, so all form fields MUST 
be trimmed;

2) macs will create false binaries on uploads, so you have to check if something is 
really  truly being uploaded; we do it (roughly) thusly:

cfif Len(form.image)

!--- now check for mac ie problems ---

cflock name=#form.image# type=READONLY timeout=30

cffile action=ReadBinary 

file=#form.image# 

variable=aBinaryObj

/cflock

!--- now proceed only if this is not a mac tmp file ---

cfif Len(variables.aBinaryObj) GT 2

[proceed with upload]

/cfif

/cfif


-Original Message-
From: David Brown [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 2:07 PM
To: CF-Talk
Subject: MAC blank input type=file


We have a simple web page that allows users to upload files to our web
server via input type=file.  In edit mode if the user leaves the input
type=file field blank, then we don't try to use cfile to upload a new file
since the edit is only text changes. All works fine when using a PC, but if
the user is on a MAC the type=file is not blank.  Even though the user never
browsed to a file, the form.field is not null.

I could put a check box on the form page that a mac user could use to
identify if the field is blank.

Any have another idea.




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4




Input type=File troubles

2002-10-02 Thread Brian Scandale

Using the type=file attribute on an input to a form

I browse to this:
\\YREKA\yreka.root\var\www\html\af\images\explode.gif

When I submit the form it ends up saving the Forminput string to the database like 
this:
\YREKAyreka.rootvarwwwhtmlafimagesexplode.gif

It strips out all the \ except for the double one.
Could this be an effect of cf_formurl2attributes ??

Anyway...
So I add enctype=multipart/form-data to the form tag

Now I get this in the database:
/home/coldfusionmx/runtime/servers/default/SERVER-INF/temp/wwwroot-tmp/neotmp20506.tmp

Whats that??? looks like a temp storage location that CF might want to use while the 
file uploads??? HOWEVER, all I am doing at the moment is Naming a file and trying to 
store the name... Later I will go get the file and Upload it.

So I add enctype=text/plain to the form tag
And it throws me to my login page... seems like it is blowing out all my 
client.variables which if the system sees takes the user straight to the LogIn page.


What I'm trying to do is ... simply browse to a file name... and then use that in a 
subsequent cffile upload but first I am saving the filename to a database... I 
will be turning that around once I can save the filename properly.

Any pointers... or point me to where I can find this explained in more detail than I 
can find. It seems that trial and error is required because I really don't understand 
what I am reading.

Thanks ;-(
Brian

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



Re: Input type=File troubles

2002-10-02 Thread Brook

Are you doing a cffile action=upload command on the page the receives 
the form post? Here is an example:

!--- upload new file ---

cffile action=upload
nameconflict=makeunique
filefield=submitbutton
destination=#fpath#\media_elements\

cfset attributes.filename=File.ServerFile

Then you write the name of the file to the DB...



At 05:08 PM 02/10/02 -0700, you wrote:
Using the type=file attribute on an input to a form

I browse to this:
\\YREKA\yreka.root\var\www\html\af\images\explode.gif

When I submit the form it ends up saving the Forminput string to the 
database like this:
\YREKAyreka.rootvarwwwhtmlafimagesexplode.gif

It strips out all the \ except for the double one.
Could this be an effect of cf_formurl2attributes ??

Anyway...
So I add enctype=multipart/form-data to the form tag

Now I get this in the database:
/home/coldfusionmx/runtime/servers/default/SERVER-INF/temp/wwwroot-tmp/neot 
mp20506.tmp

Whats that??? looks like a temp storage location that CF might want to use 
while the file uploads??? HOWEVER, all I am doing at the moment is Naming 
a file and trying to store the name... Later I will go get the file and 
Upload it.

So I add enctype=text/plain to the form tag
And it throws me to my login page... seems like it is blowing out all my 
client.variables which if the system sees takes the user straight to the 
LogIn page.


What I'm trying to do is ... simply browse to a file name... and then use 
that in a subsequent cffile upload but first I am saving the filename 
to a database... I will be turning that around once I can save the 
filename properly.

Any pointers... or point me to where I can find this explained in more 
detail than I can find. It seems that trial and error is required because 
I really don't understand what I am reading.

Thanks ;-(
Brian


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



Re: Input type=File troubles

2002-10-02 Thread Brook

Sorry, re read this and I don't think wat your are trying to do is 
possible. The file IS uploaded as soon as you submit the form to the 
tempfile location you show below. Nothing you can do about that

At 05:08 PM 02/10/02 -0700, you wrote:
Using the type=file attribute on an input to a form

I browse to this:
\\YREKA\yreka.root\var\www\html\af\images\explode.gif

When I submit the form it ends up saving the Forminput string to the 
database like this:
\YREKAyreka.rootvarwwwhtmlafimagesexplode.gif

It strips out all the \ except for the double one.
Could this be an effect of cf_formurl2attributes ??

Anyway...
So I add enctype=multipart/form-data to the form tag

Now I get this in the database:
/home/coldfusionmx/runtime/servers/default/SERVER-INF/temp/wwwroot-tmp/neot 
mp20506.tmp

Whats that??? looks like a temp storage location that CF might want to use 
while the file uploads??? HOWEVER, all I am doing at the moment is Naming 
a file and trying to store the name... Later I will go get the file and 
Upload it.

So I add enctype=text/plain to the form tag
And it throws me to my login page... seems like it is blowing out all my 
client.variables which if the system sees takes the user straight to the 
LogIn page.


What I'm trying to do is ... simply browse to a file name... and then use 
that in a subsequent cffile upload but first I am saving the filename 
to a database... I will be turning that around once I can save the 
filename properly.

Any pointers... or point me to where I can find this explained in more 
detail than I can find. It seems that trial and error is required because 
I really don't understand what I am reading.

Thanks ;-(
Brian


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



Re: Input type=File troubles

2002-10-02 Thread Brian Scandale

Adding cfqueryparam to the insert statement solved my problem for me.

CFQUERYPARAM value=#theFileName# cfsqltype=CF_SQL_CHAR

Now... I'm off to figure out the rest of cffile ... 

Thanks Brook... you got me looking deeper.



At 05:45 PM 10/2/02, you wrote:
Sorry, re read this and I don't think wat your are trying to do is 
possible. The file IS uploaded as soon as you submit the form to the 
tempfile location you show below. Nothing you can do about that

At 05:08 PM 02/10/02 -0700, you wrote:
Using the type=file attribute on an input to a form

I browse to this:
\\YREKA\yreka.root\var\www\html\af\images\explode.gif

When I submit the form it ends up saving the Forminput string to the 
database like this:
\YREKAyreka.rootvarwwwhtmlafimagesexplode.gif

It strips out all the \ except for the double one.
Could this be an effect of cf_formurl2attributes ??

Anyway...
So I add enctype=multipart/form-data to the form tag

Now I get this in the database:
/home/coldfusionmx/runtime/servers/default/SERVER-INF/temp/wwwroot-tmp/neot 
mp20506.tmp

Whats that??? looks like a temp storage location that CF might want to use 
while the file uploads??? HOWEVER, all I am doing at the moment is Naming 
a file and trying to store the name... Later I will go get the file and 
Upload it.

So I add enctype=text/plain to the form tag
And it throws me to my login page... seems like it is blowing out all my 
client.variables which if the system sees takes the user straight to the 
LogIn page.


What I'm trying to do is ... simply browse to a file name... and then use 
that in a subsequent cffile upload but first I am saving the filename 
to a database... I will be turning that around once I can save the 
filename properly.

Any pointers... or point me to where I can find this explained in more 
detail than I can find. It seems that trial and error is required because 
I really don't understand what I am reading.

Thanks ;-(
Brian



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



Re: File Browse buttons with input type=file

2002-06-03 Thread Jon Hall

Yes, but it's such a pain that I usually write it off as not worth it.
A file input object in IE (only IE, there is an RFE for Mozilla
support) has a click method that will simulate a user click and bring up the file 
browser.

http://www.devguru.com/Technologies/ecmascript/quickref/fileupload.html

What you have to do is set the file upload objects visibility to
hidden, and then use a normal button and input tags as replacements,
which of course you can style however you want.
Then add an onclick event handler to the new browse button that fires the hidden file 
upload
objects click method, this brings up the file browser.
Finally add an onchange handler to the hidden file upload field which copy's
the file field's value to your custom input field.

Something like this:

function showFile(fText) {
  document.getElementById('fTextField').value = fText;
}

function browseFiles() {
  document.getElementById('fileField').click();
}

input type=file id=fileField style=display:none onchange=showFile(this.value)
input type=text id=fTextField
input type=button onclick=browseFiles() value=browse

Beware, I just typed that out so it probably wont work. :)

-- 
jon

Monday, June 3, 2002, 12:54:32 AM, you wrote:
NH Is there a way to apply a style to the buttons on the input type=file
NH buttons?

NH Thanks,

NH Neil

__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: File Browse buttons with input type=file

2002-06-03 Thread Ryan Kime

Yes, in your style or CSS file, define the style for INPUT {} and that
will get you on the right track. Seems to ignore the color: call, but all
of my other settings work on the Browse button.

-Original Message-
From: Neil H. [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, June 02, 2002 11:55 PM
To: CF-Talk
Subject: File Browse buttons with input type=file


Is there a way to apply a style to the buttons on the input type=file
buttons?

Thanks,

Neil


__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: File Browse buttons with input type=file

2002-06-03 Thread Neil H.

That worked, thanks!  Jon this one seems a bit easier :)

Neil

- Original Message -
From: Ryan Kime [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, June 03, 2002 10:11 AM
Subject: RE: File Browse buttons with input type=file


 Yes, in your style or CSS file, define the style for INPUT {} and that
 will get you on the right track. Seems to ignore the color: call, but
all
 of my other settings work on the Browse button.

 -Original Message-
 From: Neil H. [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, June 02, 2002 11:55 PM
 To: CF-Talk
 Subject: File Browse buttons with input type=file


 Is there a way to apply a style to the buttons on the input type=file
 buttons?

 Thanks,

 Neil


 
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



File Browse buttons with input type=file

2002-06-02 Thread Neil H.

Is there a way to apply a style to the buttons on the input type=file
buttons?

Thanks,

Neil

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CF and Input Type=file

2002-03-28 Thread Stephen Moretti

Mike,

 I have a layout issue here. Is there a way when you use input type=file
that you can get the browse button to appear below the form element as
apposed to the right hand side?

 Kind of an odd question, but it would save me a ton of layout work.


I'm afraid you can't change the word on the button or the position of the
button.
The best you can do is assign a class to the tag, so that it at least looks
pretty. ;o)

Regards

Stephen


__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CF and Input Type=file

2002-03-28 Thread Gyrus

 I have a layout issue here. Is there a way when you use input
type=file
 that you can get the browse button to appear below the form element
as
 apposed to the right hand side?

 The best you can do is assign a class to the tag, so that it at least
looks
 pretty. ;o)

I'm not sure you can even do that. The Browse... button's appearance is
an OS/browser thing, and applying styles to the input have no effect on
it. There was a JavaScript workaround at one point
(http://and.doxdesk.com/software/js/upload.html)
but even that's been withdrawn by the author because of difficulties.

A pain, eh?

- Gyrus


- [EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
- PGP key available


__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



CF and Input Type=file

2002-03-27 Thread Michael Tangorre

Hi everyone.
I have a layout issue here. Is there a way when you use input type=file that you can 
get the browse button to appear below the form element as apposed to the right hand 
side?

Kind of an odd question, but it would save me a ton of layout work.

Thanks,
Mike

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



OT: help with input type=file

2001-10-21 Thread Bruce, Rodney

Hello all

Would somebody help with what I am sure is something simple I am
just missing.
I would like to keep the user from typing in a file name in the
input Type=File
and force them to use the browse button.
This works input type=text  onfocus = this.blur() for a text box
I keep the user from typing in the box and force them to chose from options
given.
This generates an error input type=file onfocus=this.blur()
object doesn't support this property or method

Thanks
Rodney 
~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Getting file name form input type=file

2001-09-17 Thread Michael Wilson

Thanks Dave,

Mike

 -Original Message-
 So, you could look at File.ClientFile to see what name the 
 file had on the user's machine, and File.ServerFile to see 
 what name it has on the server (assuming you're using 
 NAMECONFLICT=MAKEUNIQUE in your CFFILE tag to prevent 
 duplicate file names). 
~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Getting file name form input type=file

2001-09-16 Thread Michael Wilson

Hi, 

I am working on some forms that will be used for inseting/editng data in
my database. On one of the forms I need to upload a file and provide the
INSERT statement with a filename for my database. I have it working
using 2 fields; 1 for the file I wish to upload and 1 for the file name
I wish to insert into my database. I currently have to copy and paste
the file name from the file path to the file name field.

I was wondering how I might be able to do this more efficiently. Is
there a way the get the file name from the input type=file so I can
use it in my SQL statement? I know that once the form is submitted a
cfoutput#form.file#/cfoutput would yield something like
C:\WINNT\TEMP\ACF12D.tmp. If it's not possible, am I going about it in
the same manner as most folks?
 

Best Regards,

Michael Wilson
961 Media, Inc.
===

Phone:704.736.9009
Fax:  704.736.9902
Mobile:   704.281.7616

http://www.961media.com
mailto:[EMAIL PROTECTED]

===
Media. it's what we do.
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Getting file name form input type=file

2001-09-16 Thread Dave Watts

 I am working on some forms that will be used for inserting/
 editing data in my database. On one of the forms I need to 
 upload a file and provide the INSERT statement with a filename 
 for my database. I have it working using 2 fields; 1 for the 
 file I wish to upload and 1 for the file name I wish to insert 
 into my database. I currently have to copy and paste the file 
 name from the file path to the file name field.
 
 I was wondering how I might be able to do this more efficiently. 
 Is there a way the get the file name from the input type=file 
 so I can use it in my SQL statement? I know that once the form 
 is submitted a cfoutput#form.file#/cfoutput would yield 
 something like C:\WINNT\TEMP\ACF12D.tmp. If it's not possible, 
 am I going about it in the same manner as most folks?

After you process the file upload with CFFILE ACTION=UPLOAD, you'll have a
bunch of variables available to you in the File scope:

attemptedServerFile
 Initial name ColdFusion used when attempting to save a file 
 
clientDirectory 
 Directory location of the file uploaded from the client's system 
 
clientFile 
 Name of the file uploaded from the client's system 
 
clientFileExt
 Extension of the uploaded file on the client's system without a period, for
example, txt not .txt 
 
clientFileName
 Filename, without an extension, of the uploaded file on the client's system

 
contentSubType
 MIME content subtype of the saved file
 
contentType
 MIME content type of the saved file
 
dateLastAccessed 
 Date and time the uploaded file was last accessed
 
fileExisted
 Indicates (Yes or No) whether or not the file already existed with the same
path 
 
fileSize 
 Size of the uploaded file 
 
fileWasAppended 
 Indicates (Yes or No) whether ColdFusion appends the uploaded file to an
existing file 
 
fileWasOverwritten
 Indicates (Yes or No) whether ColdFusion overwrites a file 
 
fileWasRenamed 
 Indicates (Yes or No) whether the uploaded file is renamed to avoid a name
conflict 
 
fileWasSaved 
 Indicates (Yes or No) whether Cold Fusion saves a file 
 
oldFileSize
 Size of a file that was overwritten in the file upload operation 
 
serverDirectory
 Directory of the file saved on the server 
 
serverFile 
 Filename of the file saved on the server 
 
serverFileExt 
 Extension of the uploaded file on the server, without a period 
 
serverFileName
 Filename, without an extension, of the uploaded file on the server 
 
timeCreated 
 Time the uploaded file was created 
 
timeLastModified
 Date and time of the last modification to the uploaded file 

(I copied this straight from the docs, which explains the slightly funky
formatting.)

So, you could look at File.ClientFile to see what name the file had on the
user's machine, and File.ServerFile to see what name it has on the server
(assuming you're using NAMECONFLICT=MAKEUNIQUE in your CFFILE tag to
prevent duplicate file names). 

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



How to Simulate a Form input type=file Post in VC++

2001-05-15 Thread jeffwilliamstevens

Does anyone know where there is some example code for me to look at?

I would also like the same code to send XML.

Also, how can you write CF to accept an XML post?

Thanks,
Jeff Stevens
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Need help for input type=file

2001-05-07 Thread ychen




Hi,
Is there a way to dynamic assign value for input field type=file without click
the browse button?

here is an example


form action=/cgi-bin/upload method=post
enctype=multipart/form-data
input type=hidden name=username value=br
input type=hidden name=password value=br
input type=file name=FileName


input type=button value=View Value
onClick=alert(this.form.FileName.value)
/form
script
document.forms[0].FileName.value= c:\WebSite\dmcs200105040214;
alert(document.forms[0].FileName.value);
/script


thanks for any suggestion


YC




www.atswebnet.com

-kev

~
Kevin Mansel
Web Developer
Fox Communications
[EMAIL PROTECTED]
DL : 425-649-1321
C : 425-346-7221



-Original Message-
From: Guy McDowell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 6:52 AM
To: CF-Talk
Subject: Inexpensive Hosting


G'day eh?

I'm trying to find very inexpensive CF hosting to no
avail. Something under $20 CDN is preferred. I need to
host my personal/resume site along with some CF
examples I have done.

Thought I saw someone post something about hosting for
$5.95 a month

If there is nothing like that, then is it possible for
me to institute CF Server Express within my own
account/directory on a regular hosting package of the
WinNT variety?

Guy
www.guymcdowell.com


Archives:
http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe:
http://www.houseoffusion.com/index.cfm?sidebar=lists
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Need help for input type=file

2001-05-07 Thread Hayes, David

No; it would be a bit of a security issue if you could.  (Your page could
select any file from a user's machine and intiate an upload.)

What I did in a previous project was simply display the file name and path
near the upload control, with instructions to drag/drop or copy/paste the
value in the control.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 8:33 AM
To: CF-Talk
Subject: Need help for input type=file





Hi,
Is there a way to dynamic assign value for input field type=file without
click
the browse button?

here is an example


form action=/cgi-bin/upload method=post
enctype=multipart/form-data
input type=hidden name=username value=br
input type=hidden name=password value=br
input type=file name=FileName


input type=button value=View Value
onClick=alert(this.form.FileName.value)
/form
script
document.forms[0].FileName.value= c:\WebSite\dmcs200105040214;
alert(document.forms[0].FileName.value);
/script


thanks for any suggestion


YC




www.atswebnet.com

-kev

~
Kevin Mansel
Web Developer
Fox Communications
[EMAIL PROTECTED]
DL : 425-649-1321
C : 425-346-7221



-Original Message-
From: Guy McDowell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 6:52 AM
To: CF-Talk
Subject: Inexpensive Hosting


G'day eh?

I'm trying to find very inexpensive CF hosting to no
avail. Something under $20 CDN is preferred. I need to
host my personal/resume site along with some CF
examples I have done.

Thought I saw someone post something about hosting for
$5.95 a month

If there is nothing like that, then is it possible for
me to institute CF Server Express within my own
account/directory on a regular hosting package of the
WinNT variety?

Guy
www.guymcdowell.com


Archives:
http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe:
http://www.houseoffusion.com/index.cfm?sidebar=lists
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: input type='file'

2001-04-17 Thread Michael Lugassy

I had the same problem, it's ain't possible.
What I used is to open a window indicating
only .jpeg or .gif is allowed and then used a javascript
to check what file was inserted in the formfield (before
uploading, not after): take a look:

script
extensions = new Array(".JPG",".GIF",".gif",".jpg")
function allowedExt(fileType){
 var extension = fileType.substring(fileType.length-4, fileType.length)
 for (var i = 0; i  extensions.length; i++) {
   if (extension == extensions[i]) {
return true
break
  }
 }alert(errorMsg()); return false
}

function errorMsg(){
  alertTxt = "Please select one of the following file types: \n\r"
  for (var i = 2; i  extensions.length; i++){
   alertTxt += extensions[i] + " "
{
  }
 }return alertTxt
}


Hope this helps.

Bye.

Michael Lugassy
Interactive Music Ltd.
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: input type='file'

2001-04-17 Thread Chiraporn

so we could not do anything about it :(


but thank you for reply Michael :)
-Original Message-
From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 4:26 PM
To: CF-Talk
Subject: Re: input type='file'


I had the same problem, it's ain't possible.
What I used is to open a window indicating
only .jpeg or .gif is allowed and then used a javascript
to check what file was inserted in the formfield (before
uploading, not after): take a look:

script
extensions = new Array(".JPG",".GIF",".gif",".jpg")
function allowedExt(fileType){
 var extension = fileType.substring(fileType.length-4, fileType.length)
 for (var i = 0; i  extensions.length; i++) {
   if (extension == extensions[i]) {
return true
break
  }
 }alert(errorMsg()); return false
}

function errorMsg(){
  alertTxt = "Please select one of the following file types: \n\r"
  for (var i = 2; i  extensions.length; i++){
   alertTxt += extensions[i] + " "
{
  }
 }return alertTxt
}


Hope this helps.

Bye.

Michael Lugassy
Interactive Music Ltd.
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: input type='file'

2001-04-17 Thread Bryan LaPlante

I have a question about your script. Assuming the input looks like so
form name="foo"
input type="file" name="bar"
/form
does your script refer to the input as document.foo.bar.value;
If so how did you work around the access denied js error that the browser
gives me when I try this?

- Original Message -
From: "Michael Lugassy" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 4:25 AM
Subject: Re: input type='file'


 I had the same problem, it's ain't possible.
 What I used is to open a window indicating
 only .jpeg or .gif is allowed and then used a javascript
 to check what file was inserted in the formfield (before
 uploading, not after): take a look:

 script
 extensions = new Array(".JPG",".GIF",".gif",".jpg")
 function allowedExt(fileType){
  var extension = fileType.substring(fileType.length-4, fileType.length)
  for (var i = 0; i  extensions.length; i++) {
if (extension == extensions[i]) {
 return true
 break
   }
  }alert(errorMsg()); return false
 }

 function errorMsg(){
   alertTxt = "Please select one of the following file types: \n\r"
   for (var i = 2; i  extensions.length; i++){
alertTxt += extensions[i] + " "
 {
   }
  }return alertTxt
 }


 Hope this helps.

 Bye.

 Michael Lugassy
 Interactive Music Ltd.

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: input type='file'

2001-04-17 Thread Michael Lugassy

form action="something.cfm" method="post" enctype="multipart/form-data"
name="uploadForm" OnSubmit="return allowedExt(this.filefield.value);"

this is the form heading.


- Original Message -
From: "Bryan LaPlante" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 10:44 AM
Subject: Re: input type='file'


 I have a question about your script. Assuming the input looks like so
 form name="foo"
 input type="file" name="bar"
 /form
 does your script refer to the input as document.foo.bar.value;
 If so how did you work around the access denied js error that the browser
 gives me when I try this?

 - Original Message -
 From: "Michael Lugassy" [EMAIL PROTECTED]
 To: "CF-Talk" [EMAIL PROTECTED]
 Sent: Tuesday, April 17, 2001 4:25 AM
 Subject: Re: input type='file'


  I had the same problem, it's ain't possible.
  What I used is to open a window indicating
  only .jpeg or .gif is allowed and then used a javascript
  to check what file was inserted in the formfield (before
  uploading, not after): take a look:
 
  script
  extensions = new Array(".JPG",".GIF",".gif",".jpg")
  function allowedExt(fileType){
   var extension = fileType.substring(fileType.length-4, fileType.length)
   for (var i = 0; i  extensions.length; i++) {
 if (extension == extensions[i]) {
  return true
  break
}
   }alert(errorMsg()); return false
  }
 
  function errorMsg(){
alertTxt = "Please select one of the following file types: \n\r"
for (var i = 2; i  extensions.length; i++){
 alertTxt += extensions[i] + " "
  {
}
   }return alertTxt
  }
 
 
  Hope this helps.
 
  Bye.
 
  Michael Lugassy
  Interactive Music Ltd.
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: input type='file'

2001-04-17 Thread Michael Lugassy

Take the script, open a new html window
and write them in BOLD LETTERS! :)
just like we did here:
http://www.imvamp.com/userpages/upload/index.cfm

Don't :(

Thanks,

Michael Lugassy
Interactive Music Ltd.
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: input type='file'

2001-04-17 Thread Bryan LaPlante

I've never gotten that to work for me. It always complains about object
required or access denied when I refer to a client side file upload. It is
my understanding that JavaScript can not access the content of the input
type due to security issues.

I will have to try your method.

- Original Message -
From: "Michael Lugassy" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 5:26 AM
Subject: Re: input type='file'


 form action="something.cfm" method="post" enctype="multipart/form-data"
 name="uploadForm" OnSubmit="return allowedExt(this.filefield.value);"

 this is the form heading.


 - Original Message -
 From: "Bryan LaPlante" [EMAIL PROTECTED]
 To: "CF-Talk" [EMAIL PROTECTED]
 Sent: Tuesday, April 17, 2001 10:44 AM
 Subject: Re: input type='file'


  I have a question about your script. Assuming the input looks like so
  form name="foo"
  input type="file" name="bar"
  /form
  does your script refer to the input as document.foo.bar.value;
  If so how did you work around the access denied js error that the
browser
  gives me when I try this?
 
  - Original Message -
  From: "Michael Lugassy" [EMAIL PROTECTED]
  To: "CF-Talk" [EMAIL PROTECTED]
  Sent: Tuesday, April 17, 2001 4:25 AM
  Subject: Re: input type='file'
 
 
   I had the same problem, it's ain't possible.
   What I used is to open a window indicating
   only .jpeg or .gif is allowed and then used a javascript
   to check what file was inserted in the formfield (before
   uploading, not after): take a look:
  
   script
   extensions = new Array(".JPG",".GIF",".gif",".jpg")
   function allowedExt(fileType){
var extension = fileType.substring(fileType.length-4,
fileType.length)
for (var i = 0; i  extensions.length; i++) {
  if (extension == extensions[i]) {
   return true
   break
 }
}alert(errorMsg()); return false
   }
  
   function errorMsg(){
 alertTxt = "Please select one of the following file types: \n\r"
 for (var i = 2; i  extensions.length; i++){
  alertTxt += extensions[i] + " "
   {
 }
}return alertTxt
   }
  
  
   Hope this helps.
  
   Bye.
  
   Michael Lugassy
   Interactive Music Ltd.
  
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: input type='file'

2001-04-17 Thread Michael Lugassy

just keep in mind that the form must come AFTER the script.

- Original Message -
From: "Bryan LaPlante" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 11:36 AM
Subject: Re: input type='file'


 I've never gotten that to work for me. It always complains about object
 required or access denied when I refer to a client side file upload. It is
 my understanding that JavaScript can not access the content of the input
 type due to security issues.

 I will have to try your method.

 - Original Message -
 From: "Michael Lugassy" [EMAIL PROTECTED]
 To: "CF-Talk" [EMAIL PROTECTED]
 Sent: Tuesday, April 17, 2001 5:26 AM
 Subject: Re: input type='file'


  form action="something.cfm" method="post" enctype="multipart/form-data"
  name="uploadForm" OnSubmit="return allowedExt(this.filefield.value);"
 
  this is the form heading.
 
 
  - Original Message -
  From: "Bryan LaPlante" [EMAIL PROTECTED]
  To: "CF-Talk" [EMAIL PROTECTED]
  Sent: Tuesday, April 17, 2001 10:44 AM
  Subject: Re: input type='file'
 
 
   I have a question about your script. Assuming the input looks like so
   form name="foo"
   input type="file" name="bar"
   /form
   does your script refer to the input as document.foo.bar.value;
   If so how did you work around the access denied js error that the
 browser
   gives me when I try this?
  
   - Original Message -----
   From: "Michael Lugassy" [EMAIL PROTECTED]
   To: "CF-Talk" [EMAIL PROTECTED]
   Sent: Tuesday, April 17, 2001 4:25 AM
   Subject: Re: input type='file'
  
  
I had the same problem, it's ain't possible.
What I used is to open a window indicating
only .jpeg or .gif is allowed and then used a javascript
to check what file was inserted in the formfield (before
uploading, not after): take a look:
   
script
extensions = new Array(".JPG",".GIF",".gif",".jpg")
function allowedExt(fileType){
 var extension = fileType.substring(fileType.length-4,
 fileType.length)
 for (var i = 0; i  extensions.length; i++) {
   if (extension == extensions[i]) {
return true
break
  }
 }alert(errorMsg()); return false
}
   
function errorMsg(){
  alertTxt = "Please select one of the following file types: \n\r"
  for (var i = 2; i  extensions.length; i++){
   alertTxt += extensions[i] + " "
{
  }
 }return alertTxt
}
   
   
Hope this helps.
   
Bye.
   
Michael Lugassy
Interactive Music Ltd.
   
  
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: input type='file'

2001-04-17 Thread Bryan LaPlante

dude, you are a genius. I have never gotten that to work. My hat is off to
ya.

- Original Message -
From: "Michael Lugassy" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 5:53 AM
Subject: Re: input type='file'


 just keep in mind that the form must come AFTER the script.

 - Original Message -
 From: "Bryan LaPlante" [EMAIL PROTECTED]
 To: "CF-Talk" [EMAIL PROTECTED]
 Sent: Tuesday, April 17, 2001 11:36 AM
 Subject: Re: input type='file'


  I've never gotten that to work for me. It always complains about object
  required or access denied when I refer to a client side file upload. It
is
  my understanding that JavaScript can not access the content of the input
  type due to security issues.
 
  I will have to try your method.
 
  - Original Message -
  From: "Michael Lugassy" [EMAIL PROTECTED]
  To: "CF-Talk" [EMAIL PROTECTED]
  Sent: Tuesday, April 17, 2001 5:26 AM
  Subject: Re: input type='file'
 
 
   form action="something.cfm" method="post"
enctype="multipart/form-data"
   name="uploadForm" OnSubmit="return allowedExt(this.filefield.value);"
  
   this is the form heading.
  
  
   - Original Message -
   From: "Bryan LaPlante" [EMAIL PROTECTED]
   To: "CF-Talk" [EMAIL PROTECTED]
   Sent: Tuesday, April 17, 2001 10:44 AM
   Subject: Re: input type='file'
  
  
I have a question about your script. Assuming the input looks like
so
form name="foo"
input type="file" name="bar"
/form
does your script refer to the input as document.foo.bar.value;
If so how did you work around the access denied js error that the
  browser
gives me when I try this?
   
- Original Message -----
From: "Michael Lugassy" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 4:25 AM
Subject: Re: input type='file'
   
   
 I had the same problem, it's ain't possible.
 What I used is to open a window indicating
 only .jpeg or .gif is allowed and then used a javascript
 to check what file was inserted in the formfield (before
 uploading, not after): take a look:

 script
 extensions = new Array(".JPG",".GIF",".gif",".jpg")
 function allowedExt(fileType){
  var extension = fileType.substring(fileType.length-4,
  fileType.length)
  for (var i = 0; i  extensions.length; i++) {
if (extension == extensions[i]) {
 return true
 break
   }
  }alert(errorMsg()); return false
 }

 function errorMsg(){
   alertTxt = "Please select one of the following file types: \n\r"
   for (var i = 2; i  extensions.length; i++){
alertTxt += extensions[i] + " "
 {
   }
  }return alertTxt
 }


 Hope this helps.

 Bye.

 Michael Lugassy
 Interactive Music Ltd.

   
  
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



input type='file'

2001-04-16 Thread Chiraporn


Anyone know how to force input type="file" ,show window dialog box display
only image file ?
I create cold fusion file with contain input type="file" and this page for
upload picture from client computer to server.
I would like  the window dialog box , display file only image files  (not
display other extension ..like .txt , .doc etc.)
Can we do that ?

Any suggestion are highly appreciated.
Phim.


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



input type=file

2001-03-09 Thread Wilson, Craig

After using the following code to browse for a file (thanks Philip),

form action="myPage.cfm" method="post" ENCTYPE="multipart/form-data"
input type="file" name="myFile"
input type="submit"
/form

I want to use the variable #FORM.MYFILE# to form part of a CFMAIL command
using mimeattach :

cfmail to="smtp.address" 
subject="Submit Problem"
mimeattach="#form.myfile#" 
from="#client.mailbox#"In #form.field1#,
#form.field2#/cfmail


For some reason (in my example I used a text file), it renders the contents
of the text document on the action page in full and doesn't interpret the
file name as a string which is what I would hope it would do.

Can anyone help?




**

The opinions expressed in this E-mail are those  of  the individual  and
not  necessarily  the  company.  This E-mail and  any files transmitted 
with it are confidential and solely for the use of the intended recipients

**

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: input type=file

2001-03-09 Thread Martin Sutton

I think you need to use:

mimeattach="'#form.myfile#'" 

That should work.

Martin.


-
LEGAL DISCLAIMER --
This message and any attachments to it is intended only for the individual
or company to which it is addressed and may contain information which is
privileged, confidential or prohibited from disclosure or unauthorised use.
If the recipient of this transmission is not the intended recipient, or the
employee or agent responsible for delivering such materials to the intended
recipient, you are hereby notified that any use, any form of reproduction,
dissemination, copying, disclosure, modification, distribution and/or
publication of this e-mail message or its attachments other than by its
intended recipient is strictly prohibited by the sender. If you have
received it in error, please return it to the sender and destroy the message
and/or copies in your possession.  The views or opinions expressed in this
email are that of the individual and not necessarily those of A.B.C (Systems
and Development) Limited or any of it's subsidiaries.



-Original Message-
From: Wilson, Craig [mailto:[EMAIL PROTECTED]]
Sent: 09 March 2001 12:55
To: CF-Talk
Subject: input type="file"


After using the following code to browse for a file (thanks Philip),

form action="myPage.cfm" method="post" ENCTYPE="multipart/form-data"
input type="file" name="myFile"
input type="submit"
/form

I want to use the variable #FORM.MYFILE# to form part of a CFMAIL command
using mimeattach :

cfmail to="smtp.address" 
subject="Submit Problem"
mimeattach="#form.myfile#" 
from="#client.mailbox#"In #form.field1#,
#form.field2#/cfmail


For some reason (in my example I used a text file), it renders the contents
of the text document on the action page in full and doesn't interpret the
file name as a string which is what I would hope it would do.

Can anyone help?





**

The opinions expressed in this E-mail are those  of  the individual  and
not  necessarily  the  company.  This E-mail and  any files transmitted 
with it are confidential and solely for the use of the intended recipients


**
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: input type=file

2001-03-09 Thread David E. Crawford

You need to first use the CFFILE tag to save the file to disk, before you
can attach it to an email message.

DC

- Original Message -
From: "Wilson, Craig" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Friday, March 09, 2001 07:55
Subject: input type="file"


 After using the following code to browse for a file (thanks Philip),

 form action="myPage.cfm" method="post" ENCTYPE="multipart/form-data"
 input type="file" name="myFile"
 input type="submit"
 /form

 I want to use the variable #FORM.MYFILE# to form part of a CFMAIL command
 using mimeattach :

 cfmail to="smtp.address"
 subject="Submit Problem"
 mimeattach="#form.myfile#"
 from="#client.mailbox#"In #form.field1#,
 #form.field2#/cfmail


 For some reason (in my example I used a text file), it renders the
contents
 of the text document on the action page in full and doesn't interpret the
 file name as a string which is what I would hope it would do.

 Can anyone help?






**

 The opinions expressed in this E-mail are those  of  the individual  and
 not  necessarily  the  company.  This E-mail and  any files transmitted
 with it are confidential and solely for the use of the intended recipients



**


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: input type=file

2001-03-09 Thread Wilson, Craig

Sorry Martin, it just renders the output still, but in quotes.

-Original Message-
From: Martin Sutton 
Sent: 09 March 2001 13:23
To: CF-Talk
Subject: RE: input type="file"


I think you need to use:

mimeattach="'#form.myfile#'" 

That should work.

Martin.


-
LEGAL DISCLAIMER --
This message and any attachments to it is intended only for the individual
or company to which it is addressed and may contain information which is
privileged, confidential or prohibited from disclosure or unauthorised use.
If the recipient of this transmission is not the intended recipient, or the
employee or agent responsible for delivering such materials to the intended
recipient, you are hereby notified that any use, any form of reproduction,
dissemination, copying, disclosure, modification, distribution and/or
publication of this e-mail message or its attachments other than by its
intended recipient is strictly prohibited by the sender. If you have
received it in error, please return it to the sender and destroy the message
and/or copies in your possession.  The views or opinions expressed in this
email are that of the individual and not necessarily those of A.B.C (Systems
and Development) Limited or any of it's subsidiaries.



-Original Message-
From: Wilson, Craig [mailto:[EMAIL PROTECTED]]
Sent: 09 March 2001 12:55
To: CF-Talk
Subject: input type="file"


After using the following code to browse for a file (thanks Philip),

form action="myPage.cfm" method="post" ENCTYPE="multipart/form-data"
input type="file" name="myFile"
input type="submit"
/form

I want to use the variable #FORM.MYFILE# to form part of a CFMAIL command
using mimeattach :

cfmail to="smtp.address" 
subject="Submit Problem"
mimeattach="#form.myfile#" 
from="#client.mailbox#"In #form.field1#,
#form.field2#/cfmail


For some reason (in my example I used a text file), it renders the contents
of the text document on the action page in full and doesn't interpret the
file name as a string which is what I would hope it would do.

Can anyone help?





**

The opinions expressed in this E-mail are those  of  the individual  and
not  necessarily  the  company.  This E-mail and  any files transmitted 
with it are confidential and solely for the use of the intended recipients


**
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: input type=file

2001-03-09 Thread Kevin Schmidt

You have to upload the file first.  You can then attach it using
CFMAILPARAM FILE="yourfilelocation"

- Original Message -
From: "Wilson, Craig" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Friday, March 09, 2001 8:23 AM
Subject: RE: input type="file"


 Sorry Martin, it just renders the output still, but in quotes.

 -Original Message-
 From: Martin Sutton
 Sent: 09 March 2001 13:23
 To: CF-Talk
 Subject: RE: input type="file"


 I think you need to use:

 mimeattach="'#form.myfile#'"

 That should work.

 Martin.

 --
--
 -
 LEGAL DISCLAIMER --
 This message and any attachments to it is intended only for the individual
 or company to which it is addressed and may contain information which is
 privileged, confidential or prohibited from disclosure or unauthorised
use.
 If the recipient of this transmission is not the intended recipient, or
the
 employee or agent responsible for delivering such materials to the
intended
 recipient, you are hereby notified that any use, any form of reproduction,
 dissemination, copying, disclosure, modification, distribution and/or
 publication of this e-mail message or its attachments other than by its
 intended recipient is strictly prohibited by the sender. If you have
 received it in error, please return it to the sender and destroy the
message
 and/or copies in your possession.  The views or opinions expressed in this
 email are that of the individual and not necessarily those of A.B.C
(Systems
 and Development) Limited or any of it's subsidiaries.



 -Original Message-
 From: Wilson, Craig [mailto:[EMAIL PROTECTED]]
 Sent: 09 March 2001 12:55
 To: CF-Talk
 Subject: input type="file"


 After using the following code to browse for a file (thanks Philip),

 form action="myPage.cfm" method="post" ENCTYPE="multipart/form-data"
 input type="file" name="myFile"
 input type="submit"
 /form

 I want to use the variable #FORM.MYFILE# to form part of a CFMAIL command
 using mimeattach :

 cfmail to="smtp.address"
 subject="Submit Problem"
 mimeattach="#form.myfile#"
 from="#client.mailbox#"In #form.field1#,
 #form.field2#/cfmail


 For some reason (in my example I used a text file), it renders the
contents
 of the text document on the action page in full and doesn't interpret the
 file name as a string which is what I would hope it would do.

 Can anyone help?






 **

 The opinions expressed in this E-mail are those  of  the individual  and
 not  necessarily  the  company.  This E-mail and  any files transmitted
 with it are confidential and solely for the use of the intended recipients



 **

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: input type=file

2001-03-09 Thread Patricia Lee

If you want to capture the name of the file in an input type="file", you
have to write a javascript event that fires on the input field... copying
the filename to a hidden field. This *can* happen before you perform the
upload. 

I do not know if you will ultimately be able to do the cfmail mime-attach,
though.  You might have to do the upload first.

Here's an example:

function copy2hidden(filefield) {   //filefield parameter is the
file html element

if (filefield.value.length != 0) {  //
filefiled must have content
//alert(filefield.value)

document.forms["uploadfile_pickfile"].fullfilename.value = filefield.value;
// set hidden field with name of file

//alert(document.forms["uploadfile_pickfile"].fullfilename.value)
} 
}

form name="uploadfile_pickfile" action="..." method="post"
input type="file" name="file" value=""
onClick="loadfilelist(destination.value)" readonly="1"
/form


|-Original Message-
|From: Wilson, Craig [mailto:[EMAIL PROTECTED]]
|Sent: Friday, March 09, 2001 7:55 AM
|To: CF-Talk
|Subject: input type="file"
|
|
|After using the following code to browse for a file (thanks Philip),
|
|form action="myPage.cfm" method="post" ENCTYPE="multipart/form-data"
|input type="file" name="myFile"
|input type="submit"
|/form
|
|I want to use the variable #FORM.MYFILE# to form part of a 
|CFMAIL command
|using mimeattach :
|
|cfmailto="smtp.address" 
|   subject="Submit Problem"
|   mimeattach="#form.myfile#" 
|   from="#client.mailbox#"In #form.field1#,
|#form.field2#/cfmail
|
|
|For some reason (in my example I used a text file), it renders 
|the contents
|of the text document on the action page in full and doesn't 
|interpret the
|file name as a string which is what I would hope it would do.
|
|Can anyone help?
|
|
|
|
|***
|***
|
|The opinions expressed in this E-mail are those  of  the 
|individual  and
|not  necessarily  the  company.  This E-mail and  any files 
|transmitted 
|with it are confidential and solely for the use of the 
|intended recipients
|
|***
|***
|
|
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Input type=File

2001-02-27 Thread Rick Eidson

Is there a way to change the button text on a file field?
 
Rick


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Input type=File

2001-02-27 Thread Patricia Lee

not that I know of.  As far as I have ever been able to tell, you can't
change anything about the button associated with the file input type.

|-Original Message-
|From: Rick Eidson [mailto:[EMAIL PROTECTED]]
|Sent: Tuesday, February 27, 2001 9:34 AM
|To: CF-Talk
|Subject: Input type=File

|
|Is there a way to change the button text on a file field?
| 
|Rick
|
|
|
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Input type=File

2001-02-27 Thread Rick Lamb

Here's a script I got to change the file button to an image. It might give
you some ideas at least.

form name="form"
input type="Text" name="textField" action="beautyFileUpload.htm"
input type="image" src="whatever.gif" name="button" value="File Upload"
onclick="document.form.fileField.click(); return false;"br
span id="fileField" style="display:none;"input type="File"
name="fileField"
onchange="document.form.textField.value=document.form.fileField.value;"/sp
an
input type="Submit"
/form

Looking over it again it looks like it just uses a button image type and
then uses javascript to invoke the file functionality when clicked. So, I'm
sure you could do the same thing with a regurlar button type and give it the
text you would like instead of using an image. I've tested it with an image
and it works in IE anyway.

Rick

-Original Message-
From: Rick Eidson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 8:34 AM
To: CF-Talk
Subject: Input type=File


Is there a way to change the button text on a file field?

Rick
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Input type=File

2001-02-27 Thread Eric Barr

Rick,

In IE 4 and UP you can control the font properties (size, face, color,
weight). I imagine that in NS 4 and up you could also control the same
properties, but I have found NS to be quirky when applying styles to
form elements.

I do not believe that you can control the text on the button.  If I had
to guess this is a security restriction so that users can always tell
when they are about to upload a file.


Regards,
-eric

Common sense is genius dressed in its working clothes.
 -- Ralph Waldo Emerson

Eric Barr
Zeff Design
(p)  212.714.6390 
(f)   212.580.7181


-Original Message-
From: Patricia Lee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 9:51 AM
To: CF-Talk
Subject: RE: Input type=File


not that I know of.  As far as I have ever been able to tell, you can't
change anything about the button associated with the file input type.

|-Original Message-
|From: Rick Eidson [mailto:[EMAIL PROTECTED]]
|Sent: Tuesday, February 27, 2001 9:34 AM
|To: CF-Talk
|Subject: Input type=File

|
|Is there a way to change the button text on a file field?
| 
|Rick
|
|
|
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Javascript validating input type=file

2001-01-04 Thread DeVoil, Nick

Sebastian

Lose the semicolon

  if (document.myForm.DirectoryFile.value == "");

Nick


**
Information in this email is confidential and may be privileged. 
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system. 
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone. 
Thank you for your co-operation.
**

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Javascript validating input type=file

2001-01-03 Thread sebastian palmigiani


How can you use Javascript to validate an input type="file" field. The
code below gets triggered no matter what -- even with a file in the browse
input box.

Any suggestions



script language="JavaScript"
function validate() {
  if (document.myForm.DirectoryFile.value == ""); {
   alert("Choose the participants.xls file in your computer.");
return false;
}
return true;
}


---

table
form action="index.cfm?go=BatchDirectory" method="post"
enctype="multipart/form-data" name="myForm" OnSubmit="return validate();"
tr
 tdinput type="file" name="DirectoryFile" size="36"/td
/tr
tr
tdinput type="submit" value="submit"/td
   /tr
/form
/table


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Input type=File

2000-11-10 Thread W Luke


 I'm trying to do an INPUT type="file"..., but it doesn't seem to work!
In
 reading some websites and documentation, it looks like I need to install
 Microsoft Posting Acceptor. Does anyone have any experience with this? Is
it
 still required for Windows 2000? All the copies I can find seem to be
rather
 old, so I don't want to install anything without knowing that it is in
fact
 what I'm looking for.

Do you mean you want to upload a file?  If so, something like this should
work, for GIF files.  You will need to change the destination field
obviously.

cfif NOT isdefined('form.FileName')

cfform action="upload.cfm" method="POST" enablecab="Yes"
enctype="multipart/form-data"
input type="file" name="FileName"
input type="submit"
/cfform

cfelse

CFFILE ACTION="Upload"
FILEFIELD="FileName"
DESTINATION="c:\inetpub\wwwroot\"
ACCEPT="image/gif"
NAMECONFLICT="MakeUnique"

 cfoutputThe file #serverfile# was successfully uploaded/cfoutput

/cfif

Will


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



Re: Input type=File

2000-11-10 Thread Heather Haindel

In your form tag, you need to set the enctype:

form name="formname" enctype="multipart/form-data"
action="action.cfm" method="post" onSubmit="return
formCheck()"

--- Norman Elton [EMAIL PROTECTED] wrote:
 Well I'm not particularly looking for any
 photojournalists, BUT:
 
 I'm trying to do an INPUT type="file"..., but it
 doesn't seem to work! In
 reading some websites and documentation, it looks
 like I need to install
 Microsoft Posting Acceptor. Does anyone have any
 experience with this? Is it
 still required for Windows 2000? All the copies I
 can find seem to be rather
 old, so I don't want to install anything without
 knowing that it is in fact
 what I'm looking for.
 
 Thanks!
 
 Norman Elton
 Information Technology
 College of William  Mary
 


 Archives:

http://www.mail-archive.com/cf-talk@houseoffusion.com/
 Unsubscribe:
 http://www.houseoffusion.com/index.cfm?sidebar=lists
 or send a message with 'unsubscribe' in the body to
[EMAIL PROTECTED]


__
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



Input type=File

2000-11-09 Thread Norman Elton

Well I'm not particularly looking for any photojournalists, BUT:

I'm trying to do an INPUT type="file"..., but it doesn't seem to work! In
reading some websites and documentation, it looks like I need to install
Microsoft Posting Acceptor. Does anyone have any experience with this? Is it
still required for Windows 2000? All the copies I can find seem to be rather
old, so I don't want to install anything without knowing that it is in fact
what I'm looking for.

Thanks!

Norman Elton
Information Technology
College of William  Mary


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



OT: JS to programmatically fire off input type=file browse button?

2000-05-10 Thread Lomvardias, Christopher

Does anyone know how I can get JS to fire off the "Browse" button for an
input type="file" form element in Netscape 4+?

I've got it working fine in IE (see code below), but it doesn't do anything
in NS.

script language="JavaScript"
!--
function RunThis() {
document.myform.test2.click();
}
//--
/script
/head

body onload="RunThis()"
form action="test" enctype="multipart/form-data" name="myform"
input type="file" name="test2" size="27"
/form


Thanks,

Chris
--
Chris Lomvardias
[EMAIL PROTECTED]
Syscom, Inc.
400 E. Pratt Street, Suite 300
Baltimore, MD 21202
(410)539-3737 x1722 voice
(410)539-7302 fax
[EMAIL PROTECTED] (pager via email)
http://www.syscom.com/
--
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.