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!

form buttons

Status
Not open for further replies.

looperboy

Technical User
Dec 12, 2003
37
DE
can a button on a form perform two functions when clicked?

what I would like is a form where the user inputs their name and email address, and the button will both submit their information and force a download at the same time.
 
Well you could submit (post) the form info to another asp page (no html) where a script inserts the form data into the DB, then below that runs another script that downloads the file, then redirects to your chosen page.

The scripts are here in this forum I expect.


 
You can also embed Javascript into the button, so that it calls two functions. One function to submit (do a search for using javascript to submit a form instead of the standard HTML submit) and one function that opens a new browser window directly tied to the file you would like the person to download.

Then you can have the user download the file, as well as automatically send him/her to the next page.

Earnie Eng
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top