Forum Moderators: coopster

Message Too Old, No Replies

executing a file when a button is clicked

         

scoobie

5:34 pm on May 3, 2005 (gmt 0)

10+ Year Member



Hi,

I was wondering if someone could help me. I want to execute a .reg file when the user clicks a certain button. does anybody know how to do this. i already have the file created but i don't know the code to execute it if button clicked,

thanks,

scoobie

jatar_k

9:13 pm on May 3, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



are you looking to update the user's registry?

I am not sure how or if this will work through a browser, try a link with your .reg file as the target and see what happens.

scoobie

7:57 am on May 4, 2005 (gmt 0)

10+ Year Member



i tested the file and it works. if i put path of it in the address bar it works i just don't know how to do the same using a button. the is the code i used:

<button type = "submit" onclick = "document.location.href='file:///C:\Program Files\Apache Group\Apache2\htdocs\User.reg';">
User Registry File
</button>

thanks,

scoobie

jatar_k

4:45 pm on May 4, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



hmmm, on the same machine though, you should test it by throwing it up on a remote server.

you could set that file as the form action or you could have a php script serve up that file.

scoobie

5:10 pm on May 8, 2005 (gmt 0)

10+ Year Member



Hi.

i tried putting it in the form tags but could not get it to work. do you know any sample code that i could use. i tried it on a remote server aswell but that doesn't work when i click a button however if i place the file in the htdocs folder on the server and from the client pass it in the url it works.but i want it to execute when user clicks a button.

thanks,

scoobie