Announcement Announcement Module
No announcement yet.
Need help... View file using popup window Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help... View file using popup window


    I have a form to upload file (text file) in a jsp file. So I have

    <input type="file" id="file" name="file" />. By using this jsp form, I successfully upload the file.

    Now, there is one more requirement. I need to view this file before upload it (sometimes) !!!.

    So, I think I have to have a link "View file". When I click in this link, a popup window will show the content of the file.

    So I create a link with a JavaScript that will run a controller and open a popup jsp page

    <td>File Upload:</td>

    <spring:bind path="command.file"><input type="file" name="file"/>
    <a href="javascript:openpopup('<c:url value="/myapplication/view-file"> <caram name="${status.expression}" value="${status.value}"/></c:url>')">View file</a>

    However, I cannot get the content of the file ( from ${status.value} ) to display in this popup window

    Do you have any idea or suggestion about this...

    Many thanks
    Last edited by shoa; Oct 10th, 2006, 08:43 PM.