Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending files from client

Status
Not open for further replies.

jhowe

Programmer
May 19, 2000
28
US
Good morning...<br><br>I am developing an app for IE5.0+ where I need to have a mechanism for the user to send 1-5 small files that are stored on the client to a server. The ideal case would be via email with 1-5 attachments. Does anyone have any ideas on how to open an email (I can require the use of Outlook if an ActiveX object would help) and attach files to it ?<br><br>Also, if I have to resort to an &lt;input file=&quot;...&quot;&gt; tag then is there a way to use JavaScript to assign values to those file fields ?<br><br>My goal is to get the correct files uploaded without having the user specify the names of the files (very error prone).<br><br>Thanks for any help !!!
 
Dear jhowe,<br><br>I don't understand this:<br><br>&gt; &lt;input file=&quot;...&quot;&gt; <br><br>but this:<br><br>&gt; My goal is to get the correct files uploaded without having the user specify the names of the files <br><br>is accomplished by using the &lt;input type=&quot;file&quot; name=&quot;whatever&quot;&gt; tag. This tag in IE5 displays an edit box and a browse button. When the user clicks the browse button a Windows File Open Dialog is presented to the user for selecting the file to upload. This is about as user friendly as you can get.<br><br>Of course you need some server side code handle the download of the file and persist it to disk or whatever.<br><br>Hope this helps<br>-pete
 
You could disallow the user from typing in the box, and only allow them to use the little &quot;...&quot; button. This way, you've eliminated that whole error prone thing.<br><br>I don't think you can change the contents of the values property, because that would severly compromise security ;o).<br><br><A HREF="mailto:jared@aauser.com">jared@aauser.com</A>
 
Let me just say that you can not upload something using JavaScript. There needs to be a server-side script to do that. <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence.
 
Thanks for your help. I ended up using Jscript to create an ActiveX instance of Microsoft Outlook and then created and sent an email with the files automatically attached. I did not mention that this was an HTA application before so your replies are all valid.<br><br>Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top