im fairly new to javascript so here goes: Im building an application that requires a database (i'm using wampserver) and i want to create a desktop icon which is a shortcut to the login page for the program. When the user double clicks the shortcut on the desktop, i want to automatically launch the wamp server. Ive done a little research and google has told me this is possible but only using ActiveX. Firefox may block the application...
The thing is, im following code samples from google and it is not working; maybe i'm doing something wrong?
or maybe what i want to do is not possible?
(for simplicity, i've included my javascript code in my html code)
this is what i'm doing:
Expand|Select|Wrap|Line Numbers
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" title="loginPage" type="text/css" href="loginPage.css" />
- <script Language="JScript">
- function runcmd() {
- File="C:\Program Files\Wamp Server\wampmanager.exe";
- WSH=new ActiveXObject("WScript.Shell");
- WSH.run(File);
- }
- </script>
- <title>Test page</title>
- </head>
- <body onLoad="javascript:runcmd();">
- <div id="login">
- <form action="userLogin.php" method="post" enctype="multipart/form-data" name="userLoginInfo">
- <label>Login: </label>
- <input name="userName" type="text" size="15" maxlength="10" />
- <br />
- <label>Password: </label>
- <input name="password" type="password" size="15" maxlength="10" />
- <br />
- <input name="loginButton" type="button" value="Login" />
- </form>
- </div>
- </body>
- </html>
any guidance will be appreciated :)
thx