ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old July 7th, 2003, 01:20 PM
jedaffra jedaffra is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 jedaffra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile multiple form actions

Hi all,

I'm attempting to achieve a couple of things but I don't know if it's possible. I think the following piece of code will help explain what I'm trying to achieve:

<%
'test whether user checked a particular check box when the user clicks the submit button

If Request.Form("mycheckbox") = "YES"

Then
'I want the forms action to post all form data to THIS_PAGE.HTML

Else
'I want the forms action to post all form data to THAT_PAGE.HTML

end if
%>

I hope someone can help me figure this out.

thanks

Reply With Quote
  #2  
Old July 7th, 2003, 07:16 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
capture the checkbox value and turn your psuedo code into a real logic statement.
if (request.form("mycheckbox") = "yes") then
form1.submit()
else
form2.submit()
end if

Reply With Quote
  #3  
Old July 8th, 2003, 08:56 AM
jedaffra jedaffra is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 jedaffra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thanks for the reply victor, but I'm hoping you can clarify for me, part of what you said. I definately got the part about turning pseudo code into a real logic statement but, if I use:

form1.submit()
else
form2.submit()
does this mean I have to use two separte forms

or is it more like...

form.submit("http://this.page.html")
else
form.submit("http://that.page.html")

???

thanks again

Reply With Quote
  #4  
Old July 8th, 2003, 01:13 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
You will define two forms on your page.

<FORM NAME=for1m ACTION=www.somepage.com>
...
</FORM>

<FORM NAME=form2 ACTION=www.someotherpage.com>
...
</FORM>

Then you will form1.submit() or form2.submit()

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > multiple form actions


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway