开发者

ActiveX write to file from JavaScript on Windows Mobile 6.5 - nothing happens

开发者 https://www.devze.com 2023-04-02 01:18 出处:网络
I need to persist some information in offline mode for future use. Normally I would use local storage from HTML5, but on Windows Mobile 6.5, it seems there is no browser available that would support H

I need to persist some information in offline mode for future use. Normally I would use local storage from HTML5, but on Windows Mobile 6.5, it seems there is no browser available that would support HTML5. So I'm analysing using ActiveX to write information to the file, which could be send to the server (manually) when back online.

The following code:

function tst_write_file() {
    var fnameinput = $("filename");
    var fname = fnameinput.value;
    var sometextinput = $("sometext");
    var sometext = sometextinput.value;
    var fso = new ActiveXObject("Scripting.FileSystemObject");
    var file = fso.CreateTextFile(fname, true, true);
    file.WriteLine(sometext);
    file.Close();
    alert("Text was written");
};

Is working on Windows (laptop), prompting tha开发者_Go百科t unsecure ActiveX requires to be run. On my IE on Windows Mobile 6.5, however, no prompt is done, no alert is shown, and I have checked in security options, that scripts are enabled.

Am I doing something wrong or this ActiveX component is not available on WM 6.5?


The Scripting object doesn't exist in Windows CE, Windows Mobile or Windows Phone.


my experience with windows mobile 5.5, 6.2 and 6.5. Scripting.FileSystemObject doesn't exist on 5.5. On 6.2 works almost perfect but file is written on the disk in different location but read the location correct. On 6.5 i tried 2 different phones. one diamond touch 2, the script works fine, but AT&T block this script. i believe in registry, but i didn't have time and balls to find out the problem

0

精彩评论

暂无评论...
验证码 换一张
取 消