FORMS - Submit - Sending form contents AND initiating file download.

They have: 5 posts

Joined: Jun 1999

I have a simple form with a simple submit button. What I want is the submit button to send me the form details (I am on demon....so I have two methods) AND then initate a download to the user of a file. How can I do this?

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

I would definitely recommend a CGI script here. Again, try either the CGI forum or

http://www.cgi-resources.com

to help you find what you need. Smiling

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

They have: 2,390 posts

Joined: Nov 1998

I would also advise reposting in the CGI forums... Smiling
JP

----------
The Webmaster Promotion and Resource Center.
http://www.what-next.com

They have: 5 posts

Joined: Jun 1999

unfortunately, Demon do not allow the use of CGI scripts on their home pages...any ideas? can I use javascript to get around this problem?

Actually I should mention that demon only have a single 'mailform' script available. What I need to do is also initiate the download. Now I am happy to do this by just adding to the functionality they provide, or replacing the entire mechanism...

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

Hmmm...that makes it a bit more difficult. I'll see if I can find something out on how that might be done. Someone else here might know off-hand, so stay tuned. Smiling

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

They have: 76 posts

Joined: Apr 1999

Hhmm,

Maybe what you could do would be to create a confirmation page that has a Javascript that is triggered by a body onload. This Javascript would initiate the file download by simulating a click on a link or button which starts the download of the file.

If the file is dependant on the previous form you could pass it's name and location in a hidden box or pass it in the address bar (depends on whether you're using get or post).

It's definately possible, but if you don't know scripting it could be difficult, this is not possible in HTML alone.

Good Luck,
PJ

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.