+ Reply
Results 1 to 3 of 3

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Question regarding javascript in HTML widget

is a discussion within the

Skinning / Themes Discussion

forums, a part of the

Design and Media For the iPhone / iPod Touch

section;
I would like to know if Javascript can be used to move a file from one directory to another. That's all! If anyone knows a widget that does something like
...
  1. #1
    iPhoneaholic altoiddealer's Avatar
    Join Date
    Dec 2011
    Posts
    425
    Thanks
    133
    Thanked 312 Times in 145 Posts

    Default Question regarding javascript in HTML widget
    I would like to know if Javascript can be used to move a file from one directory to another.

    That's all!

    If anyone knows a widget that does something like this, or has any suggestions on how I might accomplish this, that would also be great.

    Many thanks in advance!

  2. #2
    King Kong ain't got nothing on me! King_O_Hill's Avatar
    Join Date
    Apr 2011
    Location
    USA
    Posts
    9,283
    Thanks
    41,196
    Thanked 17,388 Times in 6,350 Posts

    A quick google search will show you how to use the move command:

    <SCRIPT LANGUAGE=”JavaScript”>

    myActiveXObject=new ActiveXObject(“Scripting.FileSystemObject”);
    file = myActiveXObject.GetFile(“c\jw.txt”);
    file.Move(“d\”, true);

    </SCRIPT>
    Last edited by King_O_Hill; 12-30-2012 at 11:10 PM.
    Widget-Weather App Now Available! Also with MyLocation Support!
    Check out the thread here - Widget-Weather
    To install the Widget-Weather app, just go to Cydia and install. This will also remove MyLocation, as it is built in!
    Want to protect your JailBreak! Add this repo http://cydia.myrepospace.com/iLEXiNFO/ & Install "iLEX R.A.T."
    It will allow you to bring your phone back to a fresh jailbroken state!

  3. #3
    iPhoneaholic altoiddealer's Avatar
    Join Date
    Dec 2011
    Posts
    425
    Thanks
    133
    Thanked 312 Times in 145 Posts

    Quote Originally Posted by King_O_Hill View Post
    A quick google search will show you how to use the move command:

    <SCRIPT LANGUAGE=”JavaScript”>

    myActiveXObject=new ActiveXObject(“Scripting.FileSystemObject”);
    file = myActiveXObject.GetFile(“c\jw.txt”);
    file.Move(“d\”, true);

    </SCRIPT>
    Oh I searched for a bit, and I did come across that one

    That does do exactly what I want. However I believe that code requires "ActiveX", which is supported in browsers like Internet Explorer. I don't think that will work in my widget... but I may be wrong. Can anyone clarify that?

    Thanks for the quick response KotH

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