Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a client or a server script from the same button(or hyperlink)

Status
Not open for further replies.

sherlock1305

Programmer
Jul 10, 2001
21
0
0
CA
Hi,

I'm trying to make a link(or a button) that will start a download and that will permit me to write data to my database...

Someone knows how I can do it???

Thanks a lot,

Sherlock
 
Well, let's say you wanted your user to download a program called me.exe and also fire off an asp script called me.asp at the same time.

Your javascript function might look like this:

function fireMe(){
var proggy = "me.exe";
var x = window.open(proggy,'downWindow');
location = 'me.asp';
}

if you call that function onClick of a button, then it will first pop a window that will start your download, and then will change the position of the main page to 'me.asp', which will execute your script.

That popup will just close as soon as it downloads.

hope that helps! :)
paul
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top