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

  • Need help... View file using popup window

    Hello

    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"/>
    <td>
    <a href="javascript:openpopup('<c:url value="/myapplication/view-file"> <caram name="${status.expression}" value="${status.value}"/></c:url>')">View file</a>
    </td>
    </spring:bind>

    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
    sho
    Last edited by shoa; Oct 10th, 2006, 08:43 PM.
Working...
X