Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > can a form have

Reply
Thread Tools

can a form have

 
 
diablo
Guest
Posts: n/a
 
      06-22-2005
Hi

Can a form have multiple submit buttons that send it to different pages.

so if i press submitA it goes to pageA.asp
if i ress submitB it goes to pageB.asp

Thanks

D


 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      06-22-2005
diablo wrote:

> Can a form have multiple submit buttons that send it to different pages.


http://groups-beta.google.com/group/...08626c9673cba1



--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
 
 
 
Mark Parnell
Guest
Posts: n/a
 
      06-22-2005
Previously in alt.html, diablo <(E-Mail Removed)> said:

> Can a form have multiple submit buttons that send it to different pages.
>
> so if i press submitA it goes to pageA.asp
> if i ress submitB it goes to pageB.asp


Yes. Just set your script that processes the form to send the user to
the appropriate page, based on which submit button was pressed.

--
Mark Parnell
http://www.clarkecomputers.com.au
alt.html FAQ :: http://html-faq.com/
 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      06-22-2005
diablo wrote:

> Can a form have multiple submit buttons that send it to different pages.
>
> so if i press submitA it goes to pageA.asp
> if i ress submitB it goes to pageB.asp


No. But what you *can* do is submit the form to one single page that
checks to see what button was pressed and then redirects the user to
pageA.asp or pageB.asp.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
Noozer
Guest
Posts: n/a
 
      06-22-2005

"diablo" <(E-Mail Removed)> wrote in message
news:B28ue.107$(E-Mail Removed)...
> Hi
>
> Can a form have multiple submit buttons that send it to different pages.
>
> so if i press submitA it goes to pageA.asp
> if i ress submitB it goes to pageB.asp


No. Only one "SUBMIT" button per form.

You CAN use scripting to alter the behaviour of a form though. Create
multiple buttons with an ONCLICK event in each that does the modification.


 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      06-22-2005
Noozer wrote:

<snip>
> No. Only one "SUBMIT" button per form.

<snip>
Ah no, you can have more that one submit button to a form, it become and
array element just like any other form field in a form with the same
name attribute.

Yes, you cannot change a form's action by which submit button was press
without client-side scripting, but as Toby suggests a common receiving
cgi scripted page can either redirect or adjust its processing based
upon the value of the specific submit button clicked.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
NSDesign
Guest
Posts: n/a
 
      06-22-2005
> Can a form have multiple submit buttons that send it to different pages.
>
> so if i press submitA it goes to pageA.asp
> if i ress submitB it goes to pageB.asp
>
> Thanks


You might want to have a browse of the www.irt.org site specifically:
http://www.irt.org/script/form.htm
(scroll down to the "Changing the Action Property and using several Submit
Buttons" section)...

Should give you some actual working code to help you on your way

Cheers
Gary
---------------------------
NSDesign Internet Solutions
web: www.nsdesign.co.uk
support: www.nsdesign.info
Connection Packages: www.SurfMad.com
Domain Registration: www.DomainMad.com


 
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
How to retrieve form field value if form is EncType=multipart/form-dataForm? Li Zhang ASP .Net 4 02-27-2009 01:23 AM
Can 2 columns of a DataGrid have a single heading OR can I have two controls in 1 column? mark4asp ASP .Net 2 11-11-2006 02:13 AM
<form>...</form> - how to supress blank space after </form> in IE? rob c Javascript 4 12-30-2005 06:10 PM
have you got any of these i can have spike240 Case Modding 4 09-14-2005 03:48 AM



Advertisments