# JavaScript :: Browse/file attach > submit



## lubber (Jan 5, 2004)

Hi,

I have created a form with validations etc that goes to an email address via an action url (FormMail, cgi-sys thingo). 

It works fine except that the browse/upload attachment field is delivering only the file name text to my email box (example.gif, example.jpg, etc.,.). I am wondering why the attachment file itself is not being delivered? 

Is there another piece of JavaScript I should add so that the .gif or .jpg file gets delivered and not just the text of the file name, or is something else up here?  

Thanks in advance for any feedback on this...


----------



## Gibbs (Feb 28, 2005)

Can we see your JS code? Take a look at this:



```
Attachment:
```
 

Make sure you have your MIME types correct, for example to allow any image it would be 

```
allow="image/*"
```
Otherwise I don't know...


----------



## lubber (Jan 5, 2004)

Hi Gibbs,

Thanks for getting back to me. Basically my code - with your advice - is:



I also have,

in the body.

Unfortunately it still doesn't work. I now think this is because FormMail doesn't support it. 
So, I have replaced the action URL with your advice (ie: <action="mailto:[email protected]">) but that just brings up my Outlook Express email program??

Is there another way to write this action so that it won't bring up my default email program?

Regards,

T


----------



## brendandonhu (Jul 8, 2002)

You need something on the serverside if you don't want it to bring up OE. There are formmail scripts out there that support attachments.
http://hotscripts.com


----------

