jpbertra
02-13-2003, 02:24 PM
how can i call an exe without opening a new window like in
window.open("...");
PLEASE HELP ME... jp:confused:
window.open("...");
PLEASE HELP ME... jp:confused:
|
Click to See Complete Forum and Search --> : simple question ??? jpbertra 02-13-2003, 02:24 PM how can i call an exe without opening a new window like in window.open("..."); PLEASE HELP ME... jp:confused: pyro 02-13-2003, 02:29 PM If you mean to run it in your page, you can't for very obvious sercurity reasons. If you mean for users to download it is just a simple link like so: <a href="your.exe">Download my .exe</a> Note: This will bring up the option for users to open, save to disk, or cancel. LAwebTek 02-13-2003, 02:30 PM The following example will open Windows Notepad - just change the exe to the desired name and path: <html> <head> <script language="JavaScript" type="text/javascript"> function executeCommands(inputparms) { /* Instantiate the Shell object and invoke its execute method.*/ var oShell = new ActiveXObject("Shell.Application"); var commandtoRun = "C:\\WINDOWS\\NOTEPAD.EXE"; if (inputparms != "") { var commandParms = document.form.filename.value; } /* Invoke the execute method. */ oShell.ShellExecute(commandtoRun, commandParms, "", "open", "1"); } </script> </head> <body> <Input type="hidden" name="filename" /> <input type="button" value="NotePad" onClick="executeCommands(' + hasPARMS + ')" /> </body> </html> jpbertra 02-13-2003, 02:35 PM check the www.apa-pelletier.com/dev in section catalogue... click on download Acrobat Reader... this popup a page which gives you a language choice... it does download but I'm trying to get this popup window to close by itself (without a timer)after you clicked on a language choice... see what I mean... It works with IE but not Netscape... LAwebTek 02-13-2003, 02:38 PM It did close by itself when I clicked it. I see you edited your post to now say internet explorer works but not netscape. I'm using IE - netscape never seems to handle javascript well so I uninstalled the stupid thing. Maybe try self.close() instead of window.close()? just a guess really, obviously I dont care for netscape and have no way of testing this. jpbertra 02-13-2003, 02:38 PM With netscape the window stays open... Netscape is actually better because it's a strict browser... IE will understand garbage tag because it will call what it thinks is good.. LAwebTek 02-13-2003, 02:49 PM Say what you will but I get tired of 5 out of 10 websites not functioning or displaying correctly because I'm using netscape - when I surf with IE everything seems to work everywhere with no problems unless the code is just simply wrong. This goes for javascript, Java applets and CSS. IxxI 02-14-2003, 03:56 AM The only reason that 5 out of 10 websites don't work with netscape is people refusing to code for it, so unfortunately by not coding for it you'll perpetuate the problem. IxxI jpbertra 02-27-2004, 08:37 AM thank you all webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |