You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sandip Gaikwad <sa...@gmail.com> on 2007/08/18 11:29:20 UTC

tag

hi,
I want to know how I can use <html:file> tag to accept only Microsoft Word
files.
<html:file property="theFile" accept="application/msword"/>
But it is not working.
Please help me.
Thank you.

Re: tag

Posted by Laurie Harper <la...@holoweb.net>.
Can you be more specific? How is it 'not working'? Are you getting a 
file input but no restriction on what files can be selected, or just not 
getting a file input at all?

Check the generated markup in the output HTML. It's possible the browser 
just isn't enforcing the accept restriction, or that it doesn't 
understand the specification you've supplied. Or the problem could be 
something else entirely. It's hard to say without more information about 
what's happening.

L.

Sandip Gaikwad wrote:
> Should I write <html:file property="theFile" accept="*.doc"/>
> I did so. But it is also not working.
> 
> On 8/18/07, Nuwan Chandrasoma <my...@gmail.com> wrote:
>> I think you should give the file extensions
>>
>> Thanks,
>>
>> Nuwan
>>
>> Sandip Gaikwad wrote:
>>> hi,
>>> I want to know how I can use <html:file> tag to accept only Microsoft
>> Word
>>> files.
>>> <html:file property="theFile" accept="application/msword"/>
>>> But it is not working.
>>> Please help me.
>>> Thank you.
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 


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


Re: tag

Posted by Sandip Gaikwad <sa...@gmail.com>.
Should I write <html:file property="theFile" accept="*.doc"/>
I did so. But it is also not working.

On 8/18/07, Nuwan Chandrasoma <my...@gmail.com> wrote:
>
> I think you should give the file extensions
>
> Thanks,
>
> Nuwan
>
> Sandip Gaikwad wrote:
> > hi,
> > I want to know how I can use <html:file> tag to accept only Microsoft
> Word
> > files.
> > <html:file property="theFile" accept="application/msword"/>
> > But it is not working.
> > Please help me.
> > Thank you.
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: tag

Posted by Nuwan Chandrasoma <my...@gmail.com>.
I think you should give the file extensions

Thanks,

Nuwan

Sandip Gaikwad wrote:
> hi,
> I want to know how I can use <html:file> tag to accept only Microsoft Word
> files.
> <html:file property="theFile" accept="application/msword"/>
> But it is not working.
> Please help me.
> Thank you.
>
>   


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