1. #1
    Sencha User
    Join Date
    Mar 2012
    Location
    Tunisia
    Posts
    74
    Vote Rating
    1
    zied jouini is on a distinguished road

      0  

    Default Unanswered: Writting in a file with javascript

    Unanswered: Writting in a file with javascript


    SALAM all.
    i'm programming a mobile app with sencha touch, and i need to save some information in a file (saved in the phone). I try this code which allows to write a file.txt with javascript but it doesn't work.

    Code:
    {
                xtype: 'button',
                flex: 1,
                margin: 10, 
                text: 'Confirmer', 
                handler: function()
                 {
                   Ext.Msg.confirm("Confirmation","Recharge de "+Ext.getCmp('num').getValue()+" Montant "+Ext.getCmp
    
    
    ('amount').getValue(),function(btn, text){
                    
            if (btn == 'yes')
             {
            Ext.getCmp('resp').setValue("Recharge effectue");
            var file = new ActiveXObject("Scripting.FileSystemObject");
            var a = file.CreateTextFile("c:\\testfile.txt", true);
            a.WriteLine("SALAM WORLD !");
            a.Close();
             } 
             else 
             {
            Ext.getCmp('resp').setValue("Recharge annule");
             }
            
    });
             //   Ext.getCmp('resp').setValue(btn); 
                 }    
            
               },

    have you any idea how can i save few data of my mobile app in the phone for using it later.
    thank you

  2. #2
    Sencha User AkashSaikia's Avatar
    Join Date
    Oct 2011
    Location
    Mumbai, India
    Posts
    33
    Answers
    1
    Vote Rating
    0
    AkashSaikia is on a distinguished road

      0  

    Default


    Not sure exactly about the file reading and writing operations you have done is correct or not.
    Why dont you try HTML's Localstorage that is supported by sencha or you can use cookies(better is localstorage).

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Location
    Tunisia
    Posts
    74
    Vote Rating
    1
    zied jouini is on a distinguished road

      0  

    Default


    SALAM.
    thank you AKASH for your response. the wiritting function is correct, i show it in many web site. But i will test with the HTML localstorage.
    thank you

  4. #4
    Sencha User AkashSaikia's Avatar
    Join Date
    Oct 2011
    Location
    Mumbai, India
    Posts
    33
    Answers
    1
    Vote Rating
    0
    AkashSaikia is on a distinguished road

      0  

    Default


    plesure

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi