Forced submit

E

Ellie

How can I force a submit on a form. I want to load a form but then I want to
close it and have it do something and then redirect it. This is ASP 3.0.
thanks
 
O

Old Pedant

Ellie said:
How can I force a submit on a form. I want to load a form but then I want to
close it and have it do something and then redirect it. This is ASP 3.0.

<body onLoad="document.forms[0].submit( );">

Assuming it is first form on the page.
 
E

Evertjan.

=?Utf-8?B?T2xkIFBlZGFudA==?= wrote on 05 sep 2008 in
microsoft.public.inetserver.asp.general:
Ellie said:
How can I force a submit on a form. I want to load a form but then I
want to close it and have it do something and then redirect it. This
is ASP 3.0.

<body onLoad="document.forms[0].submit( );">

Assuming it is first form on the page.

Indeed, the whole concept of form and submitting is clientsiide, not ASP.

You cannot close a form.

You cannot redirect a form.
 
B

Bob Barrows [MVP]

Ellie said:
How can I force a submit on a form. I want to load a form but then I
want to close it and have it do something and then redirect it. This
is ASP 3.0. thanks

I don't understand ... why load the form in the first place? Just
process the data and redirect to the page you really want to go ... ?
 
E

Ellie

Probably because I don't know what I'm doing! I have to upload a file but it
doesn't work if I try to put it in the same asp page as all of the other
processing. I have to add the ENCTYPE="multipart/form-data" to the form
statement which my page doesn't seem to like. I didn't know I could have
more than one form on a page??? This does open up a lot more possibilitie
but it seems I can get that accomplished with having a redirect to a form
input page, pass it the file information to upload, submit the form and then
redirect it back to what the original page was doing.
 
E

Evertjan.

Ellie wrote on 05 sep 2008 in microsoft.public.inetserver.asp.general:
I can get that accomplished with having a redirect to a form
input page, pass it the file information to upload, submit the form
and then redirect it back to what the original page was doing.

You cannot do anything clientside, like submit a form,
and after that do a serverside redirect.

And a clientside redirect, what is that?
 
A

Anthony Jones

Ellie said:
Probably because I don't know what I'm doing! I have to upload a file but
it doesn't work if I try to put it in the same asp page as all of the
other processing. I have to add the ENCTYPE="multipart/form-data" to the
form statement which my page doesn't seem to like. I didn't know I could
have more than one form on a page??? This does open up a lot more
possibilitie but it seems I can get that accomplished with having a
redirect to a form input page, pass it the file information to upload,
submit the form and then redirect it back to what the original page was
doing.

What are you using on the serverside to receive the file?

When using multipart/form-data encoding ASPs Request.Form collection is not
able to return the field contents. The fields are there but encoded as mime
parts which ASP doesn't understand. Some serverside uploader tools allow
you to access these fields. Without this sort of support it will be
difficult to achieve what you want in a pure HTML form.

Note that a file input cannot be initialised with a file path. Hence any
plan to have the response form an ordinary post to automatically send
another post containing the file will fail.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,186
Latest member
vinaykumar_nevatia

Latest Threads

Top