when your inline frame is done getting the file it can send some javascript to the browser to change an src of a hidden img tag to the url of the uploaded file. thats one way to do this. another way is to treat the hidden frame as an actual component and place it where you want the preview to be, that way after the upload it can write out an img tag.
-igor On Mon, Jun 22, 2009 at 2:14 AM, Arie Fishler<[email protected]> wrote: > Hi, > > I know this was handled many times here in a way but this is not exactly the > regular kind of "ajax submit for an upload field". > > I have implemented the ajax submit using the inline frame solution. > However...I want to have a preview of an uploaded file (image for example) > BEFORE submitting the form. > > I have several fields in a form one of which is an uploaded file field. > Clicking an upload link near the uploaded file field should load the file > and not submit the form. > When the user sees the file, fills all the other fields he would like to > submit the form. > > This is pretty common use case I guess. > > Nested forms does not work here (inner form has only an upload field with > ajax submit method) so only separate form go....which is not good for me. > > Is there a descent way to implement this? > > Thanks, > Arie > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
