aspose file tools*
The moose likes Struts and the fly likes Ajax Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Ajax Problem" Watch "Ajax Problem" New topic
Author

Ajax Problem

Raja ji
Greenhorn

Joined: Dec 19, 2005
Posts: 16
Hi All,

How to use OnChange event on file(Browse)

Actually there is no file tag in ajax , then how to use OnChange event on file(Browse) .

My requirement is that when i select a file from a drive by using browse then some text fields should be filled up .

I want to use ajax here but there is no related tag to do so.
Please help me .

Thanks in Advance,
riyasat
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
This could be problematic. When you add an <input type="file"> tag (or an <html:file> tag that renders to the same), the browser automatically handles the browse function using operating system APIs to display the browse dialogue. You have no direct control over this, and therefore can't insert any ajax calls into this process.

About the only workaround I can think of would be to write your own applet to handle the file browse and selection process and call that instead of using the <input type="file"> tag. You can then control what happens when a file is selected.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ajax Problem