Results 1 to 3 of 3

Thread: xtype file; selecting the file doesn't update the textfield with the filename

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    68
    Answers
    3
    Vote Rating
    1
      0  

    Default xtype file; selecting the file doesn't update the textfield with the filename

    Hi there,

    I have a strange problem with the xtype file. The selection of the files works as supposed but on the Android 4.1.2 once the file is selected the textfield that should contain the filename is empty.

    This is a problem because then the user doesn't understand that the file has indeed been selected.

    Also sometimes the file selection restarts the app and I don't understand why.

    Did anybody else have these problems and how did you solve it?

    Thank you very much for all your help and your suggestions. Please feel free to ask more info if needed.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,780
    Answers
    3955
    Vote Rating
    1312
      0  

    Default

    That's interesting... have you tried a plain <input type="file" /> on a normal html page to see if that device shows the same behavior?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    68
    Answers
    3
    Vote Rating
    1
      0  

    Default

    I tried on the vanilla phonegap(2.9.0) project with this index.html:

    Code:
    <html>
        <head>
            <meta charset="utf-8" />
            <meta name="format-detection" content="telephone=no" />
            <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
            <link rel="stylesheet" type="text/css" href="css/index.css" />
            <title>Hello World</title>
        </head>
        <body>
            <div class="app">
                <h1>Apache Cordova</h1>
                <div id="deviceready" class="blink">
                    <p class="event listening">Connecting to Device</p>
                    <p class="event received">Device is Ready</p>
                                    <input type="file" name="prova" value="" size="20" />
                </div>
            </div>
            <script type="text/javascript" src="cordova.js"></script>
            <script type="text/javascript" src="js/index.js"></script>
            <script type="text/javascript">
                app.initialize();
            </script>
        </body>
    </html>

    When I start the app I get only the button but there is no textfield anywhere. I can choose a file but once the file is picked I don't have any feedback because there is no textfield to be filled in.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •