[CLOSED] Is there a way to click the textfield portion of the FileUploadField to get the file upload dialog?

  1. #1

    [CLOSED] Is there a way to click the textfield portion of the FileUploadField to get the file upload dialog?

    I want the user to be able to click the textfield portion to load the upload file dialog in the same was as clicking the browse button works. Can you provide a sample how I could do this?
    Last edited by Baidaly; Aug 02, 2013 at 3:52 AM. Reason: [CLOSED]
  2. #2
    Hi @michaeld,

    This appears to be working as you need in IE9, FireFox and Chrome.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    
        <script>
            var onAfterRender = function (fieldUploadField) {
                fieldUploadField.inputEl.on("click", function () {
                    this.dom.click();
                }, fieldUploadField.fileInputEl)
            };
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:FileUploadField ID="FileUploadField1" runat="server">
                <Listeners>
                    <AfterRender Fn="onAfterRender" />
                </Listeners>
            </ext:FileUploadField>
        </form>
    </body>
    </html>
  3. #3
    Thank you!

Similar Threads

  1. Replies: 0
    Last Post: Sep 15, 2012, 9:26 AM
  2. File upload design issue and click problem
    By Nagaraju in forum 1.x Help
    Replies: 0
    Last Post: Jan 17, 2012, 10:08 AM
  3. Upload file in one click
    By vishal.jhala@gmail.com in forum 1.x Help
    Replies: 7
    Last Post: Aug 11, 2011, 5:55 PM
  4. [CLOSED] File Dialog on Image Click
    By jwf in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 21, 2011, 10:03 AM

Posting Permissions