Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: input type=file


Message #1 by "Pieter" <pieter.schockaert@c...> on Tue, 16 Apr 2002 13:55:54
--part1_f2.1a2ebf6f.29ef220d_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

ok try this code it should help you

<html>
<head>
<title>test</title>

<style>

imput.up {
  border-top-color: threedhighlight;
  border-right-color: threeddarkshadow;
  border-bottom-color: threeddarkshadow;
  border-left-color: threedhighlight;
         }

</style>

<script language="javascript">
function press(on)
{
    var el = window.event.srcElement;
    if (el && !el.disabled && el.nodeName == "IMPUT") {
        if (on) {
            el.className = "up";
        } 
    }
}
</script>

</head>
<body>

<DIV id="menuBar2" onmouseup="press(true)">
    <FORM NAME="oForm"
            ACTION="topLayout.htm"
            ENCTYPE="multipart/form-data"
            METHOD="get"
  >
    <TABLE>
      <TR>
          <TD><INPUT SIZE="60" TYPE="file" NAME="oFile" onClick=";"></TD>
      </TR>
      <TR>
          <TD ALIGN="right"><BUTTON style="width:80px;">OK</BUTTON> &nbsp;&
nbsp;<BUTTON style="width:80px;" onclick="window.close()">CANCEL</BUTTON></TD>
      </TR>
    </TABLE>
  </FORM>
</DIV>

</body>
</html>

you may have to modify it a bit for it to work


  Return to Index