You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by thosters <th...@orga-systems.com> on 2007/03/08 10:59:14 UTC

Re: [Solved] Question: Style for "Browse"-button of "inputFileUpload"?

Thank you for the quick replies, Mr. Strittmatter and Mr. Robinson.


Well, it is a pity you cannot style that button - it really stands out when
all the other buttons are styled.

I found  http://www.quirksmode.org/dom/inputfile.html another hack/solution 
on this, however it requires javascript to work properly (which is, in my
case, not applicable i. e. wanted).

Right now I wonder - is there another way to trigger the "browse"-dialog of
a browser without using "input type=file"?
I googled a bit: Javascript apparently cannot (see 
http://www.thescripts.com/forum/thread151864.html here ). And I cannot rely
on  http://blog.brandags.com/browse-for-folder-dialog-in-javascript.html
ActiveX stuff  since I cannot take a Windows OS for granted. 

Any further ideas how to trigger a "browse"-dialog of a browser (using jsf
only maybe)? 





Andrew Robinson-5 wrote:
> 
> There are ways to style the file input control, but all involve a hack
> that usually consists of putting a tag above the file control. Since
> it is considered a security problem to style the file input control,
> there really is no easy, standard way of doing it.
> 
> http://tinyurl.com/ysq5hb
> 
> On 3/6/07, Strittmatter, Stephan <St...@sybit.de> wrote:
>> Hi thorsters,
>>
>> no, it is nt possible. Your guess was correct. It _is_ an "<input
>> type="file">" in HTML.
>>
>> Regards,
>>
>> Stephan
>>
>> -----Original Message-----
>>
>>
>> Hi all!
>>
>>
>> I am using an "inputFileUpload" to upload files, which works fine!
>> However I cannot apply a css-style to the "browse"-button, it still
>> looks
>> like a standard browser button.
>>
>> Since it did not work so far, my guess would be that "inputFileUpload"
>> acts
>> like "<input type="file">" in HTML, where you cannot style the
>> "browse"-button as well (see forum entry
>> http://archivist.incutio.com/viewlist/css-discuss/1139 here  for a
>> discussion on that issue).
>>
>> So that is my question:
>>    Is it possible to apply a css-style to the "browse"-button of an
>> "inputFileUpload"?
>>
>>
>>
>> Thanks for your replies,
>>
>>
>> Regards,
>>
>> thosters
>> --
>> View this message in context:
>> http://www.nabble.com/Question%3A-Style-for-%22Browse%22-button-of-%22in
>> putFileUpload%22--tf3355850.html#a9332952
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Question%3A-Style-for-%22Browse%22-button-of-%22inputFileUpload%22--tf3355850.html#a9371708
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Question: Style for "Browse"-button of "inputFileUpload"?

Posted by thosters <th...@orga-systems.com>.
Well, that's a pity. But it cannot be helped then. Guess I will have to go
with that standard "browse"-button.

Thanks everyone for your detailed replies, they were useful and helped me.



Volker Weber-5 wrote:
> 
> Hi,
> 
>> Any further ideas how to trigger a "browse"-dialog of a browser (using
>> jsf
>> only maybe)?
> 
> This is not possible for security reasons, and if you, ore somone
> other, find a way to do this, than you, or he, found a bug which may
> be fixed in the next update.
> 
> No html/javascript is allowed to access files on a system without user
> action by pressing a well known standard browse button. This is the
> reason why you can't modify this button.
> 
> regards,
>   volker
> 
> 

-- 
View this message in context: http://www.nabble.com/Question%3A-Style-for-%22Browse%22-button-of-%22inputFileUpload%22--tf3355850.html#a9494791
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Solved] Question: Style for "Browse"-button of "inputFileUpload"?

Posted by Volker Weber <v....@inexso.de>.
Hi,

> Any further ideas how to trigger a "browse"-dialog of a browser (using jsf
> only maybe)?

This is not possible for security reasons, and if you, ore somone
other, find a way to do this, than you, or he, found a bug which may
be fixed in the next update.

No html/javascript is allowed to access files on a system without user
action by pressing a well known standard browse button. This is the
reason why you can't modify this button.

regards,
  volker