Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / General ASP Topics / September 2008



Tip: Looking for answers? Try searching our database.

Forced submit

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ellie - 05 Sep 2008 20:35 GMT
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
Old Pedant - 05 Sep 2008 21:36 GMT
> 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.
Evertjan. - 05 Sep 2008 21:44 GMT
=?Utf-8?B?T2xkIFBlZGFudA==?= wrote on 05 sep 2008 in
microsoft.public.inetserver.asp.general:

>> 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
[quoted text clipped - 3 lines]
>
> 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.

Signature

Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Bob Barrows [MVP] - 05 Sep 2008 21:45 GMT
> 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 ... ?

Signature

Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Ellie - 05 Sep 2008 21:59 GMT
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.

>> 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 ... ?
Evertjan. - 05 Sep 2008 23:53 GMT
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?

Signature

Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Anthony Jones - 06 Sep 2008 08:23 GMT
> 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
[quoted text clipped - 5 lines]
> 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.

Signature

Anthony Jones - MVP ASP/ASP.NET

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.