a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

2 form push buttons

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> 2 form push buttons
Page: [1]
 
chadb

 

Posts: 487
From: Kansas
Status: offline

 
2 form push buttons - 7/12/2006 13:17:18   
Is it possible to post to 2 differnet ASP pages depending on which form push button os selected, and if so how?

Thanks
Chad
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: 2 form push buttons - 7/12/2006 13:57:40   
Sure can. One method I use is to change the actual form "action" tag using a JavaScript.

Give me a few and I'll find the example I use.

EDIT: Can't find it right at the moment, but it basically boils down to JavaScript that will look something like:

...
document.myFormName.action.value="http://www.mydomain.com/myPage.asp";
document.myFormName.submit();
...


That help any?

< Message edited by rdouglass -- 7/12/2006 14:09:25 >


_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to chadb)
chadb

 

Posts: 487
From: Kansas
Status: offline

 
RE: 2 form push buttons - 7/12/2006 17:28:24   
I am not to familar with Java, but I will mess around with it.

Thanks
Chad

(in reply to rdouglass)
BeTheBall

 

Posts: 6385
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: 2 form push buttons - 7/12/2006 18:22:39   
An example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="" method="get" name="form1">
<input type="submit" name="b1" value="Submit-1" onclick="document.form1.action='http://www.msn.com'">
<input type="submit" name="b2" value="Submit-2" onclick="document.form1.action='http://espn.go.com'">
</form>
</body>
</html>



However, keep in mind if a user has javascript disabled, the form will go nowhere.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to chadb)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: 2 form push buttons - 7/12/2006 21:04:06   
Its not always necessary to post to a different page, you just check which button was pressed and perform a different action on the same processing page

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to BeTheBall)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> ASP and Database >> 2 form push buttons
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts