Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Open file selection dialog programatically for hidden UploadItem

    Hey,

    I have managed to create a file upload component with a progress bar, by using spring backend. Now, just to make it look pretty(ier), I want to achieve a similar interface like gmail uses (which doesn't display the ugly 'Browse' button along with the form, which I would rather hide), but opens the file selection dialog upon clicking a simple link. Is that possible to achieve, because so far I didn't manage to find a way to do it. Any ideas or comments are welcome.

    regards,
    Andrius

    #2
    After finally asking the right questions on google, I came across this:

    http://stackoverflow.com/questions/210643/in-javascript-can-i-make-a-click-event-fire-programmatically-for-a-file-input-e

    It seems that the only reasonable way to achieve what I want to use the opacity workaround:

    <div style="display: block; width: 100px; height: 20px; overflow: hidden;">
    <button style="width: 110px; height: 30px; position: relative; top: -5px; left: -5px;"><a href="javascript: void(0)">Upload File</a></button>
    <input type="file" id="upload_input" name="upload" style="font-size: 50px; width: 120px; opacity: 0; filter:alpha(opacity: 0); position: relative; top: -40px;; left: -20px" />
    </div>

    Is there a way to set the opacity through smartgwt api? Or should I just create a new component on a Canvas?

    regards,
    Andrius

    Comment


      #3
      weihnachtsmann,

      Your file browser looks interesting. I have a similar requirement to work with a webdav server. Is there any chance of getting a working example that you can share? I understand if it is not possible.


      Thanks

      Comment


        #4
        Thanks, Good luck.

        Comment


          #5
          Have you released any code yet?

          Originally posted by weihnachtsmann
          I want to submit a paper to a conference demo track. In case of acceptance i can immeadiatly publish the code. For now it is not possible, sry. Notification will be at the end of May.
          Have you released any code yet?

          Comment


            #6
            Thanks looking forward to it.

            Thanks looking forward to it.

            Comment

            Working...
            X