Print Page | Close Window

Force Submit Form

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4661
Printed Date: 30 March 2026 at 11:41am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Force Submit Form
Posted By: silvaduro
Subject: Force Submit Form
Date Posted: 01 August 2003 at 4:44am

Hey,

I have a form (with some hidden fields in it) that, if a condition is true, force submits to another page before the page has begun to load.

Like,

If condition = 1 then
'Force submit form
End If

Any ideas? It doesn't necessarily have to be ASP, Java Script oranything else would be fine, I suppose.

Thanks,

silva




Replies:
Posted By: Bluefrog
Date Posted: 01 August 2003 at 8:33am

response.redirect yourpage.asp ?

Is that what you're looking for?



Posted By: Mart
Date Posted: 01 August 2003 at 3:29pm

How is your form setup, get or post?



Posted By: silvaduro
Date Posted: 01 August 2003 at 11:27pm

Response.Redirect doesn't POST the form. It just acts like you've clicked on a link, not a submit button.

I'm using Post, not Get.



Posted By: Flamewave
Date Posted: 02 August 2003 at 2:10am

If condition = 1 then
    Response.Write "<script language=""JScript"" type=""text/javascript"">document.formname.submit();</script>"
End If

Should do the trick.



-------------
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net