Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF Tomahawk File upload problem calculating image file size

 
vijay k vemula
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You've already posted this before: http://www.coderanch.com/t/422468/JSF/java/JSF-Tomahawk-File-Upload

[edit]Answer removed. You crossposted it again: http://forums.sun.com/thread.jspa?threadID=5357348&tstart=0

Good luck further.
[ December 24, 2008: Message edited by: Bauke Scholtz ]
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic