File field

liunx

Guest
Is there any way of using style sheets to create a nice button for a file field in form?<!--content-->not possible. that button is controlled by the OS and you can't do anything with it.<!--content-->IE5+ only<br />
<br />
<html><br />
<head><br />
<title> Styled browse button</title><br />
<style><br />
.bigblue {background-color:blue;color:white; border:4px outset gold; }<br />
</style><br />
</head><br />
<body><br />
<form name="theform" method="post"><br />
<span style="color:red; font-weight:bold;" Filename:</span><br /><br />
<script language="JavaScript"><br />
<!--<br />
if (document.all) <br />
{<br />
document.write('<input type="file" name="uploadFL" size="15" style="display: none;"><input type="text" name="afile">');<br />
document.write('<input type="button" class="bigblue" value="Browse ..." name="browse" OnClick="document.all.uploadFL.click(); document.all.afile.value=document.all.uploadFL.value">');<br />
} <br />
//--><br />
</script><br />
</form><br />
</body><br />
</html><br />
<br />
However, if all service packs are installed, I think the security hole is closed and the form will not actually upload the file. An interesting bit of a hack though.<!--content-->
 
Back
Top