Definitely will only work in IE...only IE sticks everything in the global namespace.
-- jon mailto:[EMAIL PROTECTED] Thursday, March 6, 2003, 2:44:08 PM, you wrote: JM> <script> JM> function preview(thisImg,thisObj){ JM> thisImg.src="file:\/\/"+thisObj.value; JM> } JM> </script> JM> <img src="clear.gif" name="myimg"> JM> <form name="myform" action="myaction.cfm" method="post" JM> enctype="multipart/form-data"> JM> <input type="file" name="upfile"> JM> <input type="button" name="func" value="Preview" JM> onclick="preview(myimg,upfile);"> JM> </form> JM> This works in IE at least, didn't test in anything else. JM> Joshua Miller JM> Head Programmer / IT Manager JM> Garrison Enterprises Inc. JM> www.garrisonenterprises.net JM> [EMAIL PROTECTED] JM> (704) 569-9044 ext. 254 JM> ************************************************************************ JM> ************* JM> Any views expressed in this message are those of the individual sender, JM> except where the sender states them to be the views of JM> Garrison Enterprises Inc. JM> This e-mail is intended only for the individual or entity to which it is JM> addressed and contains information that is private and confidential. If JM> you are not the intended recipient you are hereby notified that any JM> dissemination, distribution or copying is strictly prohibited. If you JM> have received this e-mail in error please delete it immediately and JM> advise us by return e-mail to [EMAIL PROTECTED] JM> ************************************************************************ JM> ************* JM> -----Original Message----- JM> From: Joe Zanter [mailto:[EMAIL PROTECTED] JM> Sent: Thursday, March 06, 2003 2:26 PM JM> To: CF-Talk JM> Subject: image upload via cffile: preview prior to submit? JM> Hi List! JM> I have templates which allow a user to upload an image. I would like to JM> be able to let the user preview the image before they commit the form: JM> They browse to locate the image file, and after they've said ok to a JM> file, the file path info is populated in the "upfile" field in the form JM> (below). I was thinking there should be a JS way to display that image JM> right after the "upfile" field is populated and before the form is JM> committed. JM> I didn't *want* to use another page to do it (select image, submit form, JM> use next page to add additional descriptors) but being a js novice... JM> Ideas? Ridicule? 8-P JM> The form: JM> (using cf5) JM> <cfform action="image_process.cfm" method="post" JM> enctype="multipart/form-data"> <strong><p align="center">click browse to JM> enter the filename!<br> JM> <cfoutput> JM> <input name="upfile" type="File" size="50" required="yes"> <input JM> type="Hidden" name="mountnumber" value=#URL.mountnumber#> <br><br> JM> caption: <input name="caption" type="text" size="50" required="no" JM> VALUE="enter caption here" onfocus="javascript:this.value='';"> JM> --snip-- JM> joe JM> -- JM> Joe Zanter, Materials Lab, Woodward Aircraft Engine Systems JM> 5001 North 2nd Street, Rockford IL 61125 JM> ph 815-639-6312, fx 815-639-5104 JM> mailto:[EMAIL PROTECTED] JM> Visualize Whirled Peas! JM> *** JM> The information in this e-mail is confidential and intended solely for JM> the individual or entity to whom it is addressed. If you have received JM> this e-mail in error please notify the sender by return e-mail, delete JM> this e-mail, and refrain from any disclosure or action based on the JM> information. JM> **** JM> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 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 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

