473,802 Members | 2,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<button type=submit...> and <input type=submit ...>


Hi!
I have a <form> that can be submitted thruogh three buttons and I need
to tell witch one was pressed when the form was submitted. I now do it
with 3 <input type="submit" name="..." value="...">

with <input type="submit" ...> the only name-value values submitted
(pushed into the query string) is the one of the submit button that was
pushed (if you have many of them).

Ex:
<form ...>
<input type="text" .../>
<input type="submit" name="a" value="click".. ./>
<input type="submit" name="b" value="click2". ../>
<input type="submit" name="c" value="click3". ../>
</form>

in a form like this I can easily distinguish what button was used to
submit the form AFTER SUBMITTING.
but with <button type="submit" name="..." .... > click! </button> all
the name-innertext values are submitted (pushed to the query string)

Ex:
<form ...>
<input type="text" .../>
<button type="submit" name="a"> click </button>
<button type="submit" name="b"> click2 </button>
<button type="submit" name="c"> click3 </button>
</form>

What ways do I have to distinguish what button was used to submit the
form AFTER SUBMITTING?

Is there a way to do it without using javascript?
--
Mattia <ma******@liber o.it>
http://www.chiacchierando.com/

Jul 20 '05
15 28961
Mattia wrote:

Jukka, i know that rich text, images and javascript hurt your soul of
"pure HTML" programmer. I know you want everything to be plain text,


Strawman argument. He said no such thing. Beside, as this is an html
authoring group, it'd be hard to advocate plain text documents without
going off-topic anyways.

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

Jul 20 '05 #11
Sometime around Tue, 11 Nov 2003 16:46:22 +0100, Mattia is reported to have
stated:
Jukka, i know that rich text, images and javascript hurt your soul of
"pure HTML" programmer. I know you want everything to be plain text,


http://ppewww.ph.gla.ac.uk/~flavell/www/html-smac.html

--
Mark Parnell
http://www.clarkecomputers.com.au
Jul 20 '05 #12
On Tue, 11 Nov 2003, Mattia wrote:
I will do what Salagir sugested to do!
Well, here's an interesting snippet of advice from Salagir:

|> Anyway, you describe that you now have a working solution. Just
|> stick to it, and don't create problems by switching to <button>.
|> Simple as that.
|
| If you can, yes, that's even better :)
The problem was: I had a working form with <input type="submit" ..> and
wanted to improve the look of it by substituting it with a <button> tag,
You're absolutely right: you had a working solution, and your problem
was that you wanted to get rid of it. So stop wanting that.
because in a <button> tag you can insert formatted text, images...
Nice idea. Just that browser support for that is worse than crap, in
many of the browsers used out there on the WWW.
Salagir gave me a solution,
Salagir seems to have given you more than one solution. And the
preferred one works, in a WWW context. No big surprises then that it
was also the one that you got from Jukka.
Jukka gave me nothing.
Wrong. You were just too thick to notice it. Strange that you didn't
criticise Salagir for offering you practically the same advice
(quoted above).
Jukka, i know that rich text, images and javascript hurt your soul of
"pure HTML" programmer. I know you want everything to be plain text,
Sturgeon's law proves itself again. QED.
what my boss wants.


Has your boss made a years-long study of engineering web pages for the
WWW? If not, then I know whose judgment I'd rather trust. Especially
when you show that you haven't even comprehended the context of what
Jukka was trying to tell you.

If I thought you were capable of working with it, I might mention
input type=image, but in the circumstances I think you're better off
staying with the submit button. Just possibly with some CSS
suggestions, as long as you keep in mind that they're only
suggestions.

Have fun.
Jul 20 '05 #13
On Mon, 10 Nov 2003 14:54:23 +0000, in comp.infosystem s.www.authoring.html,
Alan J. Flavell wrote:
Both of those browsers have options to disable scripting.
Yes, they are certainly lots of users with IE and without JS, even if I
do hope they'd do another step and use a real browser. I admit.

But I will stand on my idea for certain cases. Javascript is usefull and
can be used for, by exemple:
- online applications
- page with very complicated forms, like biiiiig <select> you don't
want to load 5 times...
- a neat-cool animation/thingy that won't be missed if JS is disabled
and that's NOT anoying (which exclude the fucking things that follows
your cursor, the snow on the page, etc ;)
Indeed,
every browser has an option to disable scripting: just stick it behind
an appropriate proxy.


What ? How can a proxy have any action on local javascripts ?
I enable javascript with firebird and was never bothered by any pop-up

Oh, I enabled those warnings quite deliberately by choice. I _want_
to be bothered when someone's trying to execute untrusted code on my
computer.


Well, Firebird shows a little icon in the down-left corner :)

You speak about "untrusted code". What does it mean exactly ? I use (and
know how to use) JS only for html-related changes... What kind of
functions are you thinking about ?

and others. For some little details, javascript can be usefull,

You seem to have overlooked the fact that this is an _authoring_
discussion group, and what's more, in a *WWW* context. You don't get
anywhere by arguing with users as to whether they are going to allow
you to execute your javascript on their computer. You do better to
adapt your authoring so that they get the substantive part of your
content.


I'm sorry I'm not sure I understand all the paragraph. You mean that I
should never use JS at all?
....or that we're trolling in the wrong group?

--
++++++++ Zelda, Dragon Ball, Mana and my (art)work at www.salagir.com ++++++++
Jul 20 '05 #14
On Thu, 13 Nov 2003, Salagir wrote:
What ? How can a proxy have any action on local javascripts ?
What do you understand by "local javascripts"? Bookmarklets, maybe? A
very useful concept indeed, from a user's point of view, but not the
current topic.

What we're talking about here, in contrast, are javascripts sent by
the server as part of the current web page, and possibly executed by
the client. If a proxy (junkbuster, webwasher etc.) filters the
script parts out on the way, then there's nothing for the client to
execute. So this can be effective for any browser, as I said. Some
corporate sites enforce this for all users; some users install
personal proxies of this kind as a security precaution.
You speak about "untrusted code". What does it mean exactly ?
I thought it was self-explanatory, sorry.
I'm sorry I'm not sure I understand all the paragraph. You mean that I
should never use JS at all?


No, I don't mean that at all. I mean that you should design your use
of scripting - at least for the WWW context - to be optional, on the
understanding that some proportion of your readers either cannot or
will not consent to execute it.
Jul 20 '05 #15
your guys sucks, even argu for this kind of stuff.

P.S. I have freedom of speech.
Jul 25 '06 #16

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

Similar topics

6
2823
by: Fred Phase | last post by:
The following button definition works fine in Mozilla where the value "in" is assigned to "awol_status". In Internet Explorer 6.0.2800.1106 on Win 2K the value "switch status" is assigned to "awol_status". This is not what I want :-( <button type="submit" name="awol_status" value="in">switch status</button> I have searched Google for this issue and I read of this being a problem in IE 4 but in IE5 the value="" attribute would be used
3
9606
by: phil_gg04 | last post by:
Dear All, I am trying to influence the font size for a <button> element using CSS, but failing for IE. Works ok in FF. IE seems to ignore all attempts; for example with this: div.whatever button { width: 8em; font-size: something; }
3
13161
by: TR | last post by:
Is it possible with CSS to prevent this wrapping alignment with a checkbox with a nested label? This is the label of the checkbox that wraps beneath it I'd prefer it looked like this, with a flush left margin:
2
2614
by: Christopher Benson-Manica | last post by:
According to http://www.w3schools.com/tags/tag_button.asp, the type attribute of the <button> tag is optional. Is the UA at liberty to choose any type it wishes if the attribute is omitted? Does the presence or lack of a DTD impact the answer? -- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
2
10972
by: Steve Wilkinson | last post by:
I've just started using managed C++ with VS2005, so please forgive my ignorance. I'm investigating producing a managed wrapper for some functionality of the Windows Media Format SDK. I have the following very simple header and class files: Header File: // CSJ.h
8
5683
by: Rainer Queck | last post by:
Hi NG, I have a base class "Telegram". This class , as well as all descants have a static public field "public static int TelegramNo = <a tlg no>;" Now I added all descants of Telegram to a generic List<Type>: List<Type> tlgList = new List<Type>(); TlgList.Add(typeof(Telegram1));
1
2984
by: =?Utf-8?B?RnJhbmNvaXNWaWxqb2Vu?= | last post by:
Hi there, Does anybody know how to return the results of an IEnumerable<typeas an array of the same type i.e type in a web service call without first having to collect all elements in the IEnumerable<typeand storing it in memory first? This question is really about optimizing large collections of data returned by web services. If it is possible to loop through the IEnumerable<type> with a "foreach" and somehow start formatting the...
2
3390
by: Richard Maher | last post by:
Hi, I'm trying to use the Visibility Style attribute for a Div to effectively PopUp a lightweight window with some additional context-sensitive information, when a user mouses over a given field(s). The popping-up seems to work just fine; it's the tearing down that's giving me grief. If I stick a onmouseout event on the same input field that caused the onmouseover/pop-up, it starts to flicker 'cos the <divis placed for esthetically...
1
10285
by: lovecreatesbea... | last post by:
In the following function `HardwareStatusDb()', If its arguments are declared as type of `string', I get: main.cpp:5: error: expected initializer before ‘int’. The error disappears when those arguments are declared as type of `string &'. Why am I getting this error?
5
11157
by: Ronald S. Cook | last post by:
From my business tier (class) I get back an IQueryable<Penof data. Here is my client code that works fine: PenClass penClass = new PenClass(); IQueryable<Penpens = penClass.SelectPens(); However, I want to then select a subset of this data from within the client. I tried this: IQueryable<PenpensSubset = from p in pens select p.PenId, p.PenNumber;
0
9562
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
10305
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...
1
10285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10063
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
9115
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...
1
7598
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6838
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
5494
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...
2
3792
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.