This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes JSF Tomahawk File upload problem  calculating image file size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF Tomahawk File upload problem  calculating image file size" Watch "JSF Tomahawk File upload problem  calculating image file size" New topic
Author

JSF Tomahawk File upload problem calculating image file size

vijay k vemula
Greenhorn

Joined: Dec 17, 2008
Posts: 10
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

Joined: Oct 08, 2006
Posts: 2458
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 ]
 
 
subject: JSF Tomahawk File upload problem calculating image file size
 
Similar Threads
JSF with fileupload and iframe
Buggy <t:inputFileUpload
JSF inputFileUpload Validation
Facing problem with tomahawk <t:inputFileUpload> component
JSF tomahawk file upload problem