<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">


<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Bookman Old Style";
        panose-1:2 5 6 4 5 5 5 2 2 4;}
@font-face
        {font-family:"Book Antiqua";
        panose-1:2 4 6 2 5 3 5 3 3 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I
am working on jsp&#8217;s and have an issue in uploading files. I am allowed to
upload at the max of 20MB on the server, but the issue is often user ignores
the message and tries to upload more than 20MB. The request goes to the server
and the server then throws an error message. This process however takes some
time to get executed. I would like to have a client side validation done for
the size of the file. To do this I cannot use ActiveX objects as the business
requirements strictly restricts use of ActiveX Objects. The other option is to
use the following code :<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font
color="#333399"><span style='color:#333399'>var fileObj =
document.fileSizeChecker.fileUpload.value;<o:p></o:p></span></font></span></font></p>

<p class=MsoNormal><font size=2 color="#333399" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#333399'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var
myFile = new File(document.fileSizeChecker.fileUpload.value);<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:.5in'><font size=2
color="#333399" face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:#333399'>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myFile.open(&quot;r&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:1.5in;text-indent:.5in'><font size=2
color="#333399" face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:#333399'>alert('myFile length: ' + myFile.getLength());</span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:1.5in;text-indent:.5in'><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Using
the above code produces the following javascript error &#8220;&#8217;File&#8217;
is undefined&#8221;. Please suggest how to bail out of this error or an
alternate method of achieving the purpose.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanx
in advance.<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=2 color=black face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:black'>-------------------------------------------------------</span></font><font
color=black><span style='color:black'> <br>
</span></font><font size=1 color=purple face="Book Antiqua"><span
style='font-size:7.5pt;font-family:"Book Antiqua";color:purple'>Regards,</span></font><font
color=black><span style='color:black'> <br>
</span></font><font size=2 color=navy face="Book Antiqua"><span
style='font-size:10.0pt;font-family:"Book Antiqua";color:navy'>Abhishek Ghosh</span></font><font
color=black><span style='color:black'> <br>
</span></font><font size=1 color=gray face="Bookman Old Style"><span
style='font-size:7.5pt;font-family:"Bookman Old Style";color:gray'>GEPS, GE-GDC,
Satyam Computer Services Limited</span></font><font color=black><span
style='color:black'> <br>
</span></font><font size=1 color=gray face="Bookman Old Style"><span
style='font-size:7.5pt;font-family:"Bookman Old Style";color:gray'>Satyam
Technology Centre,</span></font><font color=black><span style='color:black'> <br>
</span></font><font size=1 color=gray face="Bookman Old Style"><span
style='font-size:7.5pt;font-family:"Bookman Old Style";color:gray'>Hyderabad -
500043</span></font><font color=black><span style='color:black'> <br>
</span></font><font size=1 color=gray face="Bookman Old Style"><span
style='font-size:7.5pt;font-family:"Bookman Old Style";color:gray'>Phone :
(O)+91 40 55233562 (Extn-3062)</span></font><font color=black><span
style='color:black'> <br>
</span></font><font size=1 color=gray face="Bookman Old Style"><span
style='font-size:7.5pt;font-family:"Bookman Old Style";color:gray'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(R)+91 40 55233562 (Extn-2756)</span></font><font color=black><span
style='color:black'> <br>
</span></font><font size=1 color=gray face="Bookman Old Style"><span
style='font-size:7.5pt;font-family:"Bookman Old Style";color:gray'>Mobile : +91
94408 77249</span></font><font color=black><span style='color:black'> <br>
</span></font><font size=1 color=gray face="Bookman Old Style"><span
style='font-size:7.5pt;font-family:"Bookman Old Style";color:gray'>e-mail :</span></font><u><font
color=black><span style='color:black'> </span></font></u><u><font size=1
color=blue face="Bookman Old Style"><span style='font-size:7.5pt;font-family:
"Bookman Old Style";color:blue'>Abhishek_Ghosh@satyam.com</span></font></u><font
color=black><span style='color:black'> <br>
</span></font><font size=1 color=gray face="Bookman Old Style"><span
style='font-size:7.5pt;font-family:"Bookman Old Style";color:gray'>Web :</span></font><u><font
color=black><span style='color:black'> </span></font></u><u><font size=1
color=blue face="Bookman Old Style"><span style='font-size:7.5pt;font-family:
"Bookman Old Style";color:blue'>www.satyam.com</span></font></u><font
color=black><span style='color:black'> </span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>

<P><FONT SIZE=2 FACE="Arial">************************************************************************** </FONT></P>

<P><FONT SIZE=2 FACE="Arial">This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">**************************************************************************</FONT></P>