www.webdeveloper.com
Results 1 to 5 of 5

Thread: Open text file in notepad by javascript

  1. #1
    Join Date
    May 2007
    Posts
    5

    Open text file in notepad by javascript

    Hi!

    I want to open a .txt file by using javascript.

    I want to open the .txt file in notepad.

    Do any of you know how to do this?

    Bassobee

  2. #2
    Join Date
    May 2007
    Posts
    39
    You can open the txt file in the browser, but not in another software.

  3. #3
    Join Date
    May 2007
    Posts
    9
    go to Start->Programs->Accessories->NotePad and open the file from whatever dictionary it's in.

  4. #4
    Join Date
    Jun 2007
    Posts
    1
    You can use "ShellExecute":

    Function ExecuteApp(InputParms) {
    var ObjShell = new ActiveXObject("Shell.Application");
    var ApptoRun = "Notepad.exe";
    if (InputParms != "") {
    var AppParms = C:\\FileName;
    }
    ObjShell.ShellExecute(ApptoRun, AppParms, "", "Open", "1");
    }

  5. #5
    Join Date
    May 2008
    Posts
    1

    "ShellExecute": not working

    var ObjShell = new ActiveXObject("Shell.Application");
    var ApptoRun = "Notepad.exe";
    var AppParms = "C:\\epl_2f9048b5-a58c-439b-b497-dfcad20ac7c0.txt";
    ObjShell.ShellExecute(ApptoRun, AppParms, "", "Open", "1");

    In this code segment ObjShell.ShellExecute(ApptoRun,
    AppParms, "", "Open", "1") is throwing error.

    Hence this code segment is not usable.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles