adityam4444 0 Newbie Poster

We have got a good way to upload a file in struts framework, using enctype="multipart/form-data" and using tag html:file.

But in one of my applications I need to use a PNG image for the functionality of html:file.
The reason is, I cannot make the textbox of html:file readonly. The user has to use the button or the link provided to browse the files.

I used the CSS files and JavaScript to make html:file invisible and get its data in another readonly textbox. But I am still dissatisfied. Two reasons for that are:

1- Address is copied in the readonly textbox, but I can't submit with javascript because it gives the lovely message "Access is Denied". Submit button needs double click (I don't know why) to submit the form which is obviously useless.

2- This Application is a Portal in which equal concentration is focussed on view, i.e. lots of images and all are for Save, Open, Download etc. functionalities.

Please help me to solve this.

Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.