[thelist] Styling Input type="File"

Richard Bennett richard.bennett at skynet.be
Wed Feb 20 08:47:00 CST 2002


In an IE only environment, you can hide the <input file> and call it's click
event from any button, like this:

<input id="fileLoader" type="file" style="visibility:hidden;"></input>
<button onclick="show()"><b>a button can contain any HTML (in
IE)</b></button>

function show(){
     fileLoader.click();
     alert(fileLoader.value)
}

Cheers,
Richard.


----- Original Message -----
From: "Paul Backhouse" <paul.backhouse at 2cs.com>
To: <thelist at lists.evolt.org>
Sent: Wednesday, February 20, 2002 3:30 PM
Subject: [thelist] Styling Input type="File"


Hi everybody.

When using the input type="file" you get the browse button appear, but it
won't style - I'm pretty sure that CSS doesn't allow you to style it in
anyway, just wondering if anyone out there had a clever trick?

i basically want the button to be transparent.

cheers

Paul Backhouse
2Cs Communications UK Ltd
www.2cs.com
TEL: (01473) 62 22 63
FAX: (01473) 62 25 15

The information contained in this message is confidential and may be the
subject of legal, professional or other privilege. It is intended for the
named addressees only and may not be disclosed to anyone without the
sender's consent. If you are not the named addressee you must not use,
disclose, distribute, copy, print or rely on the contents of this message
and should destroy it immediately. If you need further information please
contact the originator of this message on the number above, or e-mail
postmaster at 2cs.com.

--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list