navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

JavaScript, window.open and .exe programs

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Microsoft FrontPage Help >> JavaScript, window.open and .exe programs
Page: [1]
 
fatlardo

 

Posts: 76
Joined: 4/15/2004
From: Shrewsbury
Status: offline

 
JavaScript, window.open and .exe programs - 11/12/2004 4:31:48   
I'm not sure if this is the right forum to post this in, but here I go.

I'm trying to get my active desktop to open programs such as notepad and word etc. The only problem is I have to use the wondow.open function in JavaScript to do it (Tables and stuff). Is there any way I can use this function to this?

I have tried with the following code:

function accessoriesopena() {
	startoff()
	window.open("file:\\C:\Windows\explore.exe")
}

function accessoriesopenb() {
	startoff()
	window.open("file:\\C:\Windows\notepad.exe")
}

function accessoriesopenc() {
	startoff()
	window.open("file:\\C:\Windows\printers.exe")
                    //Yes, I know it won't work. Notepad's what I'm interested in!!!
}


Startoff() has been defined to get rid of the menu I'm using and works. And the first function seems to work. However, all three of the functions see to be using the first function (if that makes any sense). When I call accessoriespenb() and accessoriesopenc() accessoriesopena() seems to be called, opening windows explorer. And if I change the url of the window.open function in accessoriesopena() to file:\\C:\Windows\ None of the functions work.

I have tried putting an alert into the first function to check whether it is being run, but it is not.

HELP!!!
Giomanach

 

Posts: 6075
Joined: 11/19/2003
From: England
Status: offline

 
RE: JavaScript, window.open and .exe programs - 11/12/2004 4:39:09   
Theres a misunderstanding of JS commands here...

window.open is for the browser window, not the local machine, try something like:

window.open(url.htm);
location.go(file//C:\Windows\Notepad.exe);

JavaScript was designed to alter the behvaior of the browser, rather than open local files, yes it has evolved since then, but the above should work

_____________________________




(in reply to fatlardo)
fatlardo

 

Posts: 76
Joined: 4/15/2004
From: Shrewsbury
Status: offline

 
RE: JavaScript, window.open and .exe programs - 11/12/2004 10:16:59   
Done that but it doesnt seen to work.

What is the location.go bit meant to do?
If I can understand that I might be able to work it out for myself.

(in reply to Giomanach)
Giomanach

 

Posts: 6075
Joined: 11/19/2003
From: England
Status: offline

 
RE: JavaScript, window.open and .exe programs - 11/12/2004 11:38:05   
location.go tells the browser to find the file (whatever is may be), and go to it...

location.href might work better than location.go



_____________________________




(in reply to fatlardo)
Page:   [1]

All Forums >> Web Development >> Microsoft FrontPage Help >> JavaScript, window.open and .exe programs
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts