473,386 Members | 1,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

help ! form submission question

AM
Hi all,
I am trying to get multiple submit buttons to work on my form. The
problem I am facing is that the wrong one gets triggered by default
when the user presses enter from any one of two textboxes on the form.
Is there any way to set that using html? I cannot use javascript for
my solution. Right now it seems that it is the first submit button on
the page that gets submitted and not the second like I want.

thanks
AM
Jul 20 '05 #1
7 2150
why cant you use javascript - the only solution i see is to set the focus on
the form that you want to submit.

"AM" <an*********@sbcglobal.net> wrote in message
news:52**************************@posting.google.c om...
Hi all,
I am trying to get multiple submit buttons to work on my form. The
problem I am facing is that the wrong one gets triggered by default
when the user presses enter from any one of two textboxes on the form.
Is there any way to set that using html? I cannot use javascript for
my solution. Right now it seems that it is the first submit button on
the page that gets submitted and not the second like I want.

thanks
AM

Jul 20 '05 #2
It is a client requirement that the site work with javascript disabled.
There is only one form on the page. The focus will be on a control on the
form i.e. text box.
There are two of these text boxes. when I type something in any one of these
text boxes and press enter I want it to submit using the SECOND image-submit
button on the page and not the first.
AM

"steve stevo" <st***@stevosteve.fsnet.co.uk> wrote in message
news:bk**********@news6.svr.pol.co.uk...
why cant you use javascript - the only solution i see is to set the focus on the form that you want to submit.

"AM" <an*********@sbcglobal.net> wrote in message
news:52**************************@posting.google.c om...
Hi all,
I am trying to get multiple submit buttons to work on my form. The
problem I am facing is that the wrong one gets triggered by default
when the user presses enter from any one of two textboxes on the form.
Is there any way to set that using html? I cannot use javascript for
my solution. Right now it seems that it is the first submit button on
the page that gets submitted and not the second like I want.

thanks
AM


Jul 20 '05 #3
an*********@sbcglobal.net (AM) wrote in
news:52**************************@posting.google.c om:
I am trying to get multiple submit buttons to work on my form.


Would this help?

Multiple Submit buttons in HTML
http://ppewww.ph.gla.ac.uk/~flavell/www/trysub.html
--
Kayode Okeyode
http://www.kayodeok.btinternet.co.uk...webdesign.html
Jul 20 '05 #4
please don't top-post

Anil wrote:
I am trying to get multiple submit buttons to work on my form.
The problem I am facing is that the wrong one gets triggered by
default when the user presses enter from any one of two
textboxes on the form.

url?
There is only one form on the page. The focus will be on a control
on the form i.e. text box. There are two of these text boxes. when
I type something in any one of these text boxes and press enter I
want it to submit using the SECOND image-submit button on the page
and not the first.


Why are there 2 submit buttons if there is only one form?

--
Brian
follow the directions in my address to email me

Jul 20 '05 #5
AM wrote:
I am trying to get multiple submit buttons to work on my form. The
problem I am facing is that the wrong one gets triggered by default
when the user presses enter from any one of two textboxes on the form.
Is there any way to set that using html? I cannot use javascript for
my solution. Right now it seems that it is the first submit button on
the page that gets submitted and not the second like I want.


Reverse <input/> elements position in the code, then re-arrange them
visually with a stylesheet [right-floating first button].
--
Wired Earp
Wunderbyte
Jul 20 '05 #6
AM <an*********@sbcglobal.net> wrote:
I am trying to get multiple submit buttons to work on my form. The
problem I am facing is that the wrong one gets triggered by default
when the user presses enter from any one of two textboxes on the form.
Is there any way to set that using html? I cannot use javascript for
my solution. Right now it seems that it is the first submit button on
the page that gets submitted and not the second like I want.


The theory is that the server-side program that processes the form can tell
the difference between a submit button and some other method for submitting
the form by whether the name=value pair for a submit button was included in
the submitted data.

The practice is that common browsers ignore this, and act as though the
first submit button was used when the form is submitted some other way.

The workaround is to make sure the first submit button does something
innocuous, such as allowing the user to preview the data they just entered.
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"The only things we keep permanent are those we give away" - Waite Phillips
Jul 20 '05 #7
> The practice is that common browsers ignore this, and act as though the
first submit button was used when the form is submitted some other way.
The workaround is to make sure the first submit button does something
innocuous, such as allowing the user to preview the data they just

entered.

I have to adhere to requirements regarding what the buttons do Well I
managed to do what I wanted with a bit of a hack. I put in a 1x1 transparent
gif image submit before everything else. It is too small to find ( I
couldn't ! ) and it gets triggered when the user presses enter.

thanks
AM


Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mcp6453 | last post by:
I am trying to use Jack's FormMail script (http://www.dtheatre.com/scripts/formmail). Since I'm brand new at PHP and not very good at HTML, I have an easy question, which I will narrow down. When...
9
by: Tom | last post by:
I have created the following code for a product select/payment form (don't know if there is a better way) and I have been trying to make the following changes (unsuccessfully so far): 1) ...
5
by: Richard Cornford | last post by:
I am interested in hearing opinions on the semantic meaning of FORM (elements) in HTML. I have to start of apologising because this question arose in a context that is not applicable to the...
16
by: lawrence | last post by:
I was told in another newsgroup (about XML, I was wondering how to control user input) that most modern browsers empower the designer to cast the user created input to a particular character...
10
by: Mr Newbie | last post by:
DropDown lists and Listboxes do not appear in the list of controls and values passed back to the server on PostBack in Request.Form object. Can someone confirm this to be correct and possibly...
2
by: TanBrae | last post by:
Hi all. I found this forum while searching for an answer to an error message I am getting from my submission form on my website. I hope somebody will be able to help me with this. A bit of...
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
8
Megalog
by: Megalog | last post by:
Hey guys.. my turn to ask a question: I'm having a weird issue with a form I've reworked. This form has a combo box, which when used is changing the recordsource of a subform. This subform has...
11
by: troy_lee | last post by:
I have two fields on a form. These two fields' values are based on an expression and represent a date range. I need to create a SQL statement that will use the returned values of these two fields...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.