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.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.