JSF Tomahawk File upload problem calculating image file size
vijay k vemula
Greenhorn
Joined: Dec 17, 2008
Posts: 10
posted
0
Hi All,
currently i am working on File Upload functionality in JSF + Tomahawk. I got a new requirement where i need to display file size as soon as user clicks on "Browse" button and selects the file. I am using <t:inputFileUpload>.... I tried with the following approach but its not working.
i used "onchange" event on <t:inputFileUpload> and invoking the following Javascript function to calculate the file size.
function getFileSize(path) { alert(path); image.src = path; alert(image.src); alert(image.fileSize); }
The above javascript function is working fine when i tested individually but not working when i include in my JSF page <script> section.