You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vijaya S <sv...@solutionscraft.com> on 2005/08/02 11:46:21 UTC

DownloadAction Question

Hi,

I have the following code that works okay partially.
 <tr>
   <td><html:file property="myimage"
onchange="this.form.btnpressed.value='imgpressed';this.form.submit()"
/></td>
   <td><html:img action="/fileDownload"   /></td>
 </tr>

I want the user to select an image (html:file property) and display the
image (html:img) the user selected. This works fine for the first time when
the user selects a file. But if I click on the 'Browse' (from html:file
option) again and select another file, the fileDownload action is not
called.

Can anyone help me in solving this problem?

Thanks,
Vijaya



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: DownloadAction Question

Posted by Laurie Harper <la...@holoweb.net>.
Are you sure the same action is being invoked each time? I.e. does the form 
that the user submits the second time have the same 'action' attribute? 
Failing that, you'll need to describe and/or post more of your code so we 
can see what's going on.

L.

Vijaya S wrote:

> Hi,
> 
> I have the following code that works okay partially.
>  <tr>
>    <td><html:file property="myimage"
> onchange="this.form.btnpressed.value='imgpressed';this.form.submit()"
> /></td>
>    <td><html:img action="/fileDownload"   /></td>
>  </tr>
> 
> I want the user to select an image (html:file property) and display the
> image (html:img) the user selected. This works fine for the first time when
> the user selects a file. But if I click on the 'Browse' (from html:file
> option) again and select another file, the fileDownload action is not
> called.
> 
> Can anyone help me in solving this problem?
> 
> Thanks,
> Vijaya


-- 
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org