Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Forced submit

Reply
Thread Tools

Forced submit

 
 
Ellie
Guest
Posts: n/a
 
      09-05-2008
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

 
Reply With Quote
 
 
 
 
Old Pedant
Guest
Posts: n/a
 
      09-05-2008


"Ellie" wrote:

> 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.


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      09-05-2008
=?Utf-8?B?T2xkIFBlZGFudA==?= wrote on 05 sep 2008 in
microsoft.public.inetserver.asp.general:

> "Ellie" wrote:
>
>> 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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      09-05-2008
Ellie wrote:
> 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 ... ?

--
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.


 
Reply With Quote
 
Ellie
Guest
Posts: n/a
 
      09-05-2008
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.

"Bob Barrows [MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Ellie wrote:
>> 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 ... ?
>
> --
> 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.
>
>


 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      09-05-2008
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?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
Anthony Jones
Guest
Posts: n/a
 
      09-06-2008
"Ellie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.


--
Anthony Jones - MVP ASP/ASP.NET

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
STRUTS- <html:submit> does not submit on pressing Enter key Megha Vishwanath Java 2 10-02-2009 12:52 PM
Catching Submit Event even called by document.forms[0].submit() The Crow ASP .Net 2 09-27-2005 05:03 PM
Preventing Multiple submit (Disabling Submit Button Post Click) Solution Mark ASP .Net 1 12-13-2004 08:03 PM
Disable Submit Button on Post back and On Submit in ASP.net Ghafran Abbas ASP .Net 0 10-12-2004 06:11 PM
Forced video AND forced audio from Universal Invalid Address DVD Video 32 01-18-2004 05:29 PM



Advertisments