[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

A button to download a file and post a form

Posted on 2002-07-05
13
Medium Priority
?
149 Views
Last Modified: 2010-04-09
Hey,
I thought it would be easy, maybe it is ...but not for me today. I just started creating html forms and I want a button to 1. validate data the data that the user must enter (the routine works fine), 2.Download a zip file, then 3. post the form. In that order. The download in the middle seems to be the problem. The only code I can employ is javascript. I would truly appreciate some help, I work in VB and I have little to no experience in web forms. I would like to hear the logic and flow of how I should do it. Thanks,
diek
0
Comment
Question by:diek_nf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 3
13 Comments
 
LVL 19

Expert Comment

by:webwoman
ID: 7132071
Why does it have to be in that order? You do realize you can't FORCE the user to accept a download? It's completely up to them if they want it or not.

I'd forget trying to do the download in the middle -- complete/validate the form, post it, have that take them to the download page. Makes more sense.

And you need to handle the form on the SERVER -- client side javascript won't be much help in sending it. I assume you're using a mailto for the action? It's an inherently flakey way to do it. You don't have ANY control over whether it works or not, or what you get.
0
 

Author Comment

by:diek_nf
ID: 7132097
W,
You are correct, I would like them to file out the form. The download is a user manual so they want it. I cannot control the server side.\
d
0
 

Author Comment

by:diek_nf
ID: 7132118
w,
They are already on a download page, I don't want them to have to go to another. The powers that be, want to get the contact info. The validating is actually gathering any info, if there is I want to post it and send it along to the powers that be. Somewhere in ther I want a download to take place.
d
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:diek_nf
ID: 7132179
webwoman,
You can check out my not posting, but downloading version at:
http://www.compliancecenter.com/support/RequestUserManual_Working.htm.

Thank you for your input!

d
0
 

Author Comment

by:diek_nf
ID: 7132186
opps
http://www.compliancecenter.com/support/RequestUserManual_Working.htm

Funny how a little . can cause some much trouble.
0
 

Author Comment

by:diek_nf
ID: 7132359
are you out there?

i guess a download page is in order.
0
 

Accepted Solution

by:
GooseHW earned 400 total points
ID: 7132992
I'm not 100% sure, but if the page refreshes, redirects, etc. then you won't be able to download and post at the same time. Try setting the download to open in a new window.
0
 
LVL 19

Expert Comment

by:webwoman
ID: 7133257
Exactly. YOu can't do BOTH. You've got the form going to a form handler, which is fine -- but once they do THAT, it's not going to do a download. You can have the form handler redirect them to the manual, and if it forces a download, that's what will happen.
0
 

Author Comment

by:diek_nf
ID: 7133785
goose,
I appreciate your help but....I know the option is there to propose answers but most people don't like it. I consider an answer a resolution, telling me what you did is not an answer. If what I just wrote didn't annoy you too much I would like to get an answer.

I am a vb programmer in the middle of a vb project, I got the task of creating this web page/form. Having never created a web form before I need more than 'if the page refreshes, redirects, etc. then you won't be able to download and post at the same time. Try setting the download to open in a new window.'


webwoman,
So 'You can have the form handler redirect them to the manual, and if it forces a download, that's what will happen. ' Like I just said above.

thank you,
diek
0
 

Author Comment

by:diek_nf
ID: 7133827
g and w,
so a file download is treated the same as a new page?

Is this the approach I should employ
1. User fills in form - Page1
2. User clicks submit, info validated - page 1
3. Form handler redirects - Page 1
4. Page loads ( can a download happen here, if so what event would be best?)- Page 2
0
 
LVL 19

Expert Comment

by:webwoman
ID: 7134123
Exactly. Redirect to your download, call it just like it was a link or another page. If it's a file that the browser doesn't know, it will start a download automatically. Of course, the user has to accept the download, but if they're expecting one they'll accept it.
0
 

Author Comment

by:diek_nf
ID: 7134137
w,
Thanks, I'll be back,
d
0
 

Author Comment

by:diek_nf
ID: 7138787
Goose,
After I sorted out my stuff, it worked perfectly. Have a great day programming,
d
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question