473,597 Members | 2,198 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2157
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*********@sb cglobal.net> wrote in message
news:52******** *************** ***@posting.goo gle.com...
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***@stevoste ve.fsnet.co.uk> wrote in message
news:bk******** **@news6.svr.po l.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*********@sb cglobal.net> wrote in message
news:52******** *************** ***@posting.goo gle.com...
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*********@sbc global.net (AM) wrote in
news:52******** *************** ***@posting.goo gle.com:
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*********@sb cglobal.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****@stanford alumni.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
2792
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 the email arrives, it has this information: v_firstname: asdf v_lastname: asdf b_email: asdf@bellsouth.net v_phone: asdf v_cellphone: asdf
9
2004
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) Eliminate the submit button and submit the form with onchange. 2) Open the action php page in a new window. I am using this code for different payment options (i.e., cc processing and paypal). As such, there are multiple forms on the page. The...
5
6079
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 Internet. Specifically, marking up a document that will contain multiple related form controls (intended exclusively for client-side scripting) that would never be intended to be submitted. I realise that that concept is a non-starter in an Internet...
16
6155
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 encoding. This arose in answer to my question about how to control user input. I had complained that I had users who wrote articles in Microsoft Word or WordPerfect and then input that to the web through a textarea box on a form I'd created. I've...
10
3461
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 answer why ? The impact of this is that values added via javascript will never make it back to the server side code unless one does some jiggery pokery with hidden fields etc. If this is true, then I would like to understand the reason behind the...
2
3027
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 background: I have maintained my website (it's basically for the Labrador Retriever community) for several years through a wonderful host company. This company recently sold to another and I've been having website troubles ever since. Now, the...
27
4719
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 appears that the data goes straight to the processing page, rather than the javascript seeing if data is missing and popping up an alert. I thought it may be because much of the form is populated with data from the db (lists, etc.), but when I leave...
8
4347
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 no Master/Child relationship set to the main form. Specifically the problem seems to be that everytime the recordsource of the subform is changed, the subform object itself tries to set a default Master/Child value (both fields fill with the "ID"...
11
319
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 in the WHERE clause as a date range (less than or equal to, and greater than or equal to the upper and lower dates of the range). I then need to count the total number of records returned from the query and output the record count to another...
0
7962
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7884
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8258
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6681
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5423
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3880
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3921
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1493
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.