473,385 Members | 1,620 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,385 software developers and data experts.

Ugly button

The following html creates a page with two input buttons - the first is
a small button and the second is a much larger button because it has a
longer value. In Internet Explorer 6 the second button (btn2, with the
large value) has a much thicker border than the first button.

How can I get the two buttons to look the same, regardless of the size
of the value parameter? I want btn2 to look the same as btn1.

<html>
<body>
<input type="button" name="btn1" value="Small value">
<input type="button" name="btn2" value="Button with a very large
value">
</body>
</html>

May 4 '06 #1
28 2450
AndyZa wrote:
The following html creates a page with two input buttons - the first
is a small button and the second is a much larger button because it
has a longer value. In Internet Explorer 6 the second button (btn2,
with the large value) has a much thicker border than the first
button.

How can I get the two buttons to look the same, regardless of the
size of the value parameter? I want btn2 to look the same as btn1.

<html> <body> <input type="button" name="btn1" value="Small value">
<input type="button" name="btn2" value="Button with a very large
value"> </body> </html>

From here, both buttons seem to have the same thickness of border,
whether I view them using IE6 or FF1.5.0.2.

Was the business about borders a red herring, and you just want the
buttons to look more alike; or did you really mean that you want the two
buttons to have equal border-thicknesses?

--
Jack.
May 4 '06 #2
AndyZa wrote:
The following html creates a page with two input buttons
Just stop doing so. <input type="button"> adds no functionality but
surely causes accessibility problems.
- the first is
a small button and the second is a much larger button because it has a
longer value.
Well, you additionally have a pointlesssly long value. But the real
problem is the user of <input type="button"> or, really, not disclosing
your E-mail address. Communicate, or do not communicate; there is no try.
How can I get the two buttons to look the same, regardless of the size
of the value parameter?


You don't. See the usual CSS caveats.

The odds are that you should not use forms at all.
May 4 '06 #3
> From here, both buttons seem to have the same thickness of border,
whether I view them using IE6 or FF1.5.0.2.
In IE6 on WinXP SP2 the larger button has a thicker border than the
smaller button.
Was the business about borders a red herring, and you just want the
buttons to look more alike; or did you really mean that you want the two
buttons to have equal border-thicknesses?


I want the buttons to look the same in IE6 (i.e. have the same
border-thickness) regardless of how big they are.

May 4 '06 #4
> In IE6 on WinXP SP2 the larger button has a thicker border than the
smaller button.


I opened the html page in FireFox and the buttons have the same border
thickness, regardless of how big the buttons are, so it looks like its
a IE specific "problem".

May 4 '06 #5
>> Just stop doing so. <input type="button"> adds no functionality

But this does:

<script>
function Something() {
if some_condition {
form.submit()
}
else {
alert ("Warning...")
}
}
</script>

<input type="button" onClick="Something()">
Well, you additionally have a pointlesssly long value.
Long yes, but not necessarily pointless...
But the real problem is the user of <input type="button">
Is there something wrong with using an <input type="button"> when I'm
using it to run a script on the onclick event?
or, really, not disclosing your E-mail address.
My valid e-mail address was clearly displayed in the "From:" header of
the message.
You don't. See the usual CSS caveats.
What are these "usual CSS caveats"?
The odds are that you should not use forms at all.


Please elaborate. That statement on its own isn't very helpful.
What is wrong with using forms?

May 4 '06 #6

AndyZa wrote:
Just stop doing so. <input type="button"> adds no functionality


But this does:

<script>
function Something() {
if some_condition {
form.submit()
}
else {
alert ("Warning...")
}
}
</script>

<input type="button" onClick="Something()">
Well, you additionally have a pointlesssly long value.


Long yes, but not necessarily pointless...
But the real problem is the user of <input type="button">


Is there something wrong with using an <input type="button"> when I'm
using it to run a script on the onclick event?
or, really, not disclosing your E-mail address.


My valid e-mail address was clearly displayed in the "From:" header of
the message.
You don't. See the usual CSS caveats.


What are these "usual CSS caveats"?
The odds are that you should not use forms at all.


Please elaborate. That statement on its own isn't very helpful.
What is wrong with using forms?


Thank you for correcting Mr. Korpela, but getting on to the message.

There may or may not be a border attribute for the input tag (I don't
know at the moment because I don't have a reference in front of me).
You could just try using the border attribute, even if it doesn't
exist, just so that you are able to test. Using this may invalidate
your code according to W3C, but supposedly valid code doesn't matter to
search engines. Depending on the result of that border attribute (if
it exists), as a last resort you could set the value to zero (0) in
order to keep the borders (or absence of) equal.

I hope that this helps you.

I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

May 5 '06 #7
On 04/05/2006 20:48, AndyZa wrote:

Please ensure that you attribute posts properly.
On 04/05/2006 16:55, Jukka K. Korpela wrote:
Just stop doing so. <input type="button"> adds no functionality
But this does:

<script>


Missing type attribute, aside...
function Something() {
if some_condition {
form.submit()
}
else {
alert ("Warning...")
}
}
</script>

<input type="button" onClick="Something()">


No. That /may/ add functionality, but is hardly guaranteed to on the Web.

Use of the submit method is almost always mistaken.

If you intend to validate form controls, or something similar, do so in
response to the submit event (and additionally change events, if
applicable), cancelling the action (by returning false) upon failure.
Well, you additionally have a pointlesssly long value.


Long yes, but not necessarily pointless...


Perhaps, but that can't be settled without a link.
But the real problem is the user of <input type="button">


Is there something wrong with using an <input type="button"> when I'm
using it to run a script on the onclick event?


Yes. It creates a dependency upon said script, which should be avoided
on the Web.

[snip]
You don't. See the usual CSS caveats.


What are these "usual CSS caveats"?


CSS provides presentational suggestions. You can try to do something,
such as setting particular widths for input elements, but doing so
doesn't necessarily mean that the user agent will care to comply.

[snip]

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
May 5 '06 #8
pe********************@gmail.com wrote:
Thank you for correcting Mr. Korpela, but getting on to the message.
There were no corrections to what I had written, just pointless diversions.
There may or may not be a border attribute for the input tag (I don't
know at the moment because I don't have a reference in front of me).
Maybe you should now learn how to check such facts. Hang around for some
time and you'll see the usual references to specifications posted.
You could just try using the border attribute, even if it doesn't
exist, just so that you are able to test.


Wouldn't it be better to use the dwim attribute? It's much more
powerful! (Do What I Mean.)

In reality, the way to affect button rendering in a useful way is to use
style sheets. This, however, involves many complexities and belongs to
another group. The useful questions are: 1) is a form useful to the
visitors, as opposite to telling one's E-mail address, and 2) how do we
keep button texts short? If a button text is long, you most probably
have text in a wrong place. A button text is supposed to tell briefly
what the button does, like "Send", "Submit", "Search", or "Buy", not to
contain a short story that tells all the details - which should be told
_before_ the button and often before the entire form.
May 6 '06 #9

Jukka K. Korpela wrote:
pe********************@gmail.com wrote:
Thank you for correcting Mr. Korpela, but getting on to the message.


There were no corrections to what I had written, just pointless diversions.
There may or may not be a border attribute for the input tag (I don't
know at the moment because I don't have a reference in front of me).


Maybe you should now learn how to check such facts. Hang around for some
time and you'll see the usual references to specifications posted.
You could just try using the border attribute, even if it doesn't
exist, just so that you are able to test.


Wouldn't it be better to use the dwim attribute? It's much more
powerful! (Do What I Mean.)

In reality, the way to affect button rendering in a useful way is to use
style sheets. This, however, involves many complexities and belongs to
another group. The useful questions are: 1) is a form useful to the
visitors, as opposite to telling one's E-mail address, and 2) how do we
keep button texts short? If a button text is long, you most probably
have text in a wrong place. A button text is supposed to tell briefly
what the button does, like "Send", "Submit", "Search", or "Buy", not to
contain a short story that tells all the details - which should be told
_before_ the button and often before the entire form.


I am sorry that I did not have absolute knowledge of what I was saying,
but I had remembered reading about the border attribute of input some
time ago. As I said, I did not have any reference at that moment about
the reliability of my statement. Just to see if IE or FF, or any other
browser has the attribute although it isn't supported by a certain
version of HTML, you could try that attribute and test the site from
home. IE almost never corresponds with W3C when it comes to valid
HTML. One could have a page with more than 50 invalid statements
according to W3C and still pass the validation of IE.

On the terms of using CSS, I believe that using CSS is worthless in
this case. That will just waste space loading. The only modification
with the border attribute is about 10 characters (11 depending on the
size of the value). A whole CSS template to do what you are saying
would take up at least 20 characters on about 4 lines.

If one wants to have a long button, then they may, as you cannot stop
them. They are the creator of the website, and so you should not
prevent them (nor normally can) in doing what they would like to the
website.

I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

May 6 '06 #10
Jukka K. Korpela wrote:
2) how do we keep button texts short? If a button text is long, you
most probably have text in a wrong place. A button text is supposed
to tell briefly what the button does, like "Send", "Submit",
"Search", or "Buy", not to contain a short story that tells all the
details - which should be told _before_ the button and often before
the entire form.

This is a question of design and taste, not one of the correctness or
otherwise of HTML. In matters of taste, the word "wrong" is usually
wrong, and "unpleasant", "ugly", "crufty", "distasteful" are often more
appropriate, conveying as they do the implication that what is being
expressed is a _point of view_.

Telling someone that their taste is "wrong" is simply arrogant. I find
it very off-putting, and dare I say it, distasteful.

I do agree that the practice of putting lengthy utterances into buttons
should be discouraged, but not this way.

--
Jack.
May 6 '06 #11
"pe********************@gmail.com" <pe********************@gmail.com>
wrote:
I am sorry that I did not have absolute knowledge of what I was saying,
You misspelled "no idea". And you apparently still want to babble about your
wild guesses instead of checking any facts. Consider yourself plonked.
If one wants to have a long button, then they may, as you cannot stop
them. They are the creator of the website, and so you should not
prevent them (nor normally can) in doing what they would like to the
website.


Of course you can do stupid things. Does that mean I need to help you do
that?

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

May 6 '06 #12

Jukka K. Korpela wrote:
"pe********************@gmail.com" <pe********************@gmail.com>
wrote:
I am sorry that I did not have absolute knowledge of what I was saying,


You misspelled "no idea". And you apparently still want to babble about your
wild guesses instead of checking any facts. Consider yourself plonked.
If one wants to have a long button, then they may, as you cannot stop
them. They are the creator of the website, and so you should not
prevent them (nor normally can) in doing what they would like to the
website.


Of course you can do stupid things. Does that mean I need to help you do
that?

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


If you wish to express your opinions instead of answering people's
questions, then please don't use the support forum for this. Hopefully
you have noticed the 'Reply to Author' hyperlink. This will enable you
to express your opinions without annoying others that wish to have an
answer instead of an opinion or rebuttal. This also applies to the
others that do this sometimes, such as Mr. Lahn, and Mr. Webb.

I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

May 6 '06 #13
pe********************@gmail.com wrote:
If you wish to express your opinions instead of answering people's
questions, then please don't use the support forum for this.
Please don't post to this newsgroup again until you lose the delusion
that it is a support forum.
Hopefully you have noticed the 'Reply to Author' hyperlink.
I don't see any hyperlinks outside of the frame which displays your
message. I use a real Usenet client, not whichever Web-based abomination
you undoubtedly think invented Usenet.
This will enable you
to express your opinions without annoying others that wish to have an
answer instead of an opinion or rebuttal.


What you wish is wholly irrelevant. This group is not your personal help
desk, it's a discussion group which allows debate to take place. If
you're not willing to accept the purpose of this group, please leave.

Consider yourself plonked.
May 6 '06 #14
To further the education of mankind, "pe********************@gmail.com"
<pe********************@gmail.com> vouchsafed:
If you wish to express your opinions instead of answering people's
questions, then please don't use the support forum for this.
This isn't a support forum.
Hopefully you have noticed the 'Reply to Author' hyperlink.
Nope. My newsreader doesn't have one. (Well, actually, that's a lie; it
does have one. But I deliberately didn't notice it.)
This will
enable you to express your opinions without annoying others that wish
to have an answer instead of an opinion or rebuttal.
Now I find the opinions and rebuttals far more entertaining than the facts.
Facts are dry and boring. Opinions make you think...
This also
applies to the others that do this sometimes, such as Mr. Lahn, and
Mr. Webb.
If you don't like them, why call them "Mr."?
I have the honor to remain your most humble and Ob't Sv't in our war
against the King.
Jukka's good but I don't think he's ever been crowned. (-In a coronation.)
--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment


Sig's messed up.

--
Neredbojias
Infinity has its limits.
May 7 '06 #15
AndyZa wrote:
The following html creates a page with two input buttons - the first is
a small button and the second is a much larger button because it has a
longer value. In Internet Explorer 6 the second button (btn2, with the
large value) has a much thicker border than the first button.


I believe you are talking about the stretched button bug:
http://www.designdetector.com/bugs/i...utton-bug.html

The only solution I know of is to specify a border for the button with CSS.

There is also another bug related to long buttons in IE you may wish to
take a look at too.
http://jehiah.com/archive/button-width-in-ie-revised

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
May 7 '06 #16

Neredbojias wrote:
To further the education of mankind, "pe********************@gmail.com"
<pe********************@gmail.com> vouchsafed:
If you wish to express your opinions instead of answering people's
questions, then please don't use the support forum for this.


This isn't a support forum.
Hopefully you have noticed the 'Reply to Author' hyperlink.


Nope. My newsreader doesn't have one. (Well, actually, that's a lie; it
does have one. But I deliberately didn't notice it.)
This will
enable you to express your opinions without annoying others that wish
to have an answer instead of an opinion or rebuttal.


Now I find the opinions and rebuttals far more entertaining than the facts.
Facts are dry and boring. Opinions make you think...
This also
applies to the others that do this sometimes, such as Mr. Lahn, and
Mr. Webb.


If you don't like them, why call them "Mr."?
I have the honor to remain your most humble and Ob't Sv't in our war
against the King.


Jukka's good but I don't think he's ever been crowned. (-In a coronation.)
--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment


Sig's messed up.

--
Neredbojias
Infinity has its limits.


Now then, I call them Mr.s out of courteousy, not out of reverence. If
you haven't noticed already, the ending statement "I have the honor to
remain your most humble and Ob't Sv't in our war against the King." is
given in conjunction with the signature, as I am a reenactor of the
American Revolution. If you had some time to look up Warner's
Regiment, you would realize that Warner's Regiment was a Revolutionary
War Regiment (technically not part of the Continental Armies) that was
and is based in Vermont. The "Coy." part of the signature should have
given that away, as "Coy." is an abbreviation of Company. You may
research army hierarchy if you do not understand.
Secondly, when one wishes to have an answer for a question, normally
one does not like to read through an eight post long philibuster that
is based on the keeping of dignity. If you like to read those
comments, then go ahead, but anyone who actually posts the question, or
others that wish to see the answer(s), would like to skip through those
philibusters.

I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

May 7 '06 #17
To further the education of mankind, "pe********************@gmail.com"
<pe********************@gmail.com> vouchsafed:

Neredbojias wrote:
To further the education of mankind,
"pe********************@gmail.com" <pe********************@gmail.com>
vouchsafed:
> If you wish to express your opinions instead of answering people's
> questions, then please don't use the support forum for this.
This isn't a support forum.
> Hopefully you have noticed the 'Reply to Author' hyperlink.


Nope. My newsreader doesn't have one. (Well, actually, that's a
lie; it does have one. But I deliberately didn't notice it.)
> This will
> enable you to express your opinions without annoying others that
> wish to have an answer instead of an opinion or rebuttal.


Now I find the opinions and rebuttals far more entertaining than the
facts. Facts are dry and boring. Opinions make you think...
> This also
> applies to the others that do this sometimes, such as Mr. Lahn, and
> Mr. Webb.


If you don't like them, why call them "Mr."?
> I have the honor to remain your most humble and Ob't Sv't in our
> war against the King.


Jukka's good but I don't think he's ever been crowned. (-In a
coronation.)
> --
> Patrick Reilly
> 1st Coy.
> Colonel Seth Warner's Regiment


Sig's messed up.

--
Neredbojias
Infinity has its limits.


Now then, I call them Mr.s out of courteousy, not out of reverence.


Ah, I see. I'm not so courteous, myself, and usually call my
protagonists by various anatomical appellations.
If you haven't noticed already, the ending statement "I have the honor
to remain your most humble and Ob't Sv't in our war against the King."
is given in conjunction with the signature, as I am a reenactor of the
American Revolution. If you had some time to look up Warner's
Regiment, you would realize that Warner's Regiment was a Revolutionary
War Regiment (technically not part of the Continental Armies) that was
and is based in Vermont. The "Coy." part of the signature should have
given that away, as "Coy." is an abbreviation of Company. You may
research army hierarchy if you do not understand.
That sounds interesting. My ex-next-door-neighbor was into something
like that (-although he was a bit wierd, apparently believing he was John
Hancock. Nevertheless, every weekend in good weather he'd go out into the
backyard and play with his balls and musket.)
Secondly, when one wishes to have an answer for a question, normally
one does not like to read through an eight post long philibuster that
is based on the keeping of dignity. If you like to read those
comments, then go ahead, but anyone who actually posts the question,
or others that wish to see the answer(s), would like to skip through
those philibusters.
Yes, I can understand your disgruntlement in that regard. It's happened
to me, too. However, the newsgroup is not a help desk and while some of
the coy might be egotistically depraved or deprived, you just have to
scan the cruft to get on with the craft.
I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment


-Sig's still messed up.

--
Neredbojias
Infinity has its limits.
May 7 '06 #18
> I believe you are talking about the stretched button bug:
http://www.designdetector.com/bugs/i...utton-bug.html


That's the one!

I wonder if Microsoft has fixed it in IE7?

May 8 '06 #19
> No. That /may/ add functionality, but is hardly guaranteed to on the Web.

Shouldn't be a problem on the intranet environment that I'm developing
for where everyone uses IE6 on XP SP2.
Use of the submit method is almost always mistaken.
If you intend to validate form controls, or something similar, do so in
response to the submit event (and additionally change events, if
applicable), cancelling the action (by returning false) upon failure.


Can you provide a sample of code?

May 8 '06 #20
> How can I get the two buttons to look the same, regardless of the size
of the value parameter? I want btn2 to look the same as btn1.


I added the following to my .css file:

..Button { background-color: ButtonFace }

And assigned the class to all my input buttons:

<input type="submit" name="btnClick" value="Clickme" class="Button">

Problem solved!

May 8 '06 #21
On 08/05/2006 07:43, AndyZa wrote:

[MLW:]
No. That /may/ add functionality, but is hardly guaranteed to on
the Web.


Shouldn't be a problem on the intranet environment that I'm
developing for where everyone uses IE6 on XP SP2.


This group expects questions regarding the World Wide Web (hence the
'www' in its name).
If you intend to validate form controls, or something similar, do
so in response to the submit event [...]


Can you provide a sample of code?


A typical format is:

function validate(form) {
if (!valid) {
alert('Error message.');
return false;
}
return true;
}

<form ... onsubmit="return validate(this);">

where valid is obviously some condition, and form is a reference to the
form element.

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
May 8 '06 #22
pe********************@gmail.com wrote:

Now then, I call them Mr.s out of courteousy, not out of reverence. If
you haven't noticed already, the ending statement "I have the honor to
remain your most humble and Ob't Sv't in our war against the King." is
given in conjunction with the signature, as I am a reenactor of the
American Revolution.
What is the relevance of this?
If you had some time to look up Warner's
Regiment, you would realize that Warner's Regiment was a Revolutionary
War Regiment (technically not part of the Continental Armies) that was
and is based in Vermont.
Why do I care? This is an HTML authoring group, not a revolutionary war
reenactment group.
The "Coy." part of the signature should have
given that away, as "Coy." is an abbreviation of Company. You may
research army hierarchy if you do not understand.
Why shoud I?
Secondly, when one wishes to have an answer for a question, normally
one does not like to read through an eight post long philibuster that
is based on the keeping of dignity.
Generally, when one wishes to have an answer for a question, one asks
according to the conventions of the group in which one does the asking.
And then abides by those conventions in regard to the responses.
If you like to read those
comments, then go ahead, but anyone who actually posts the question, or
others that wish to see the answer(s), would like to skip through those
philibusters.
So skip them, then.
I have the honor to remain your most humble and Ob't Sv't in our war
against the King.


AH, now I see - empty words that mean nothing to the person uttering
them. Thanks for clarifying that.
May 8 '06 #23

Tony wrote:
pe********************@gmail.com wrote:

Now then, I call them Mr.s out of courteousy, not out of reverence. If
you haven't noticed already, the ending statement "I have the honor to
remain your most humble and Ob't Sv't in our war against the King." is
given in conjunction with the signature, as I am a reenactor of the
American Revolution.


What is the relevance of this?
If you had some time to look up Warner's
Regiment, you would realize that Warner's Regiment was a Revolutionary
War Regiment (technically not part of the Continental Armies) that was
and is based in Vermont.


Why do I care? This is an HTML authoring group, not a revolutionary war
reenactment group.
The "Coy." part of the signature should have
given that away, as "Coy." is an abbreviation of Company. You may
research army hierarchy if you do not understand.


Why shoud I?
Secondly, when one wishes to have an answer for a question, normally
one does not like to read through an eight post long philibuster that
is based on the keeping of dignity.


Generally, when one wishes to have an answer for a question, one asks
according to the conventions of the group in which one does the asking.
And then abides by those conventions in regard to the responses.
> If you like to read those
comments, then go ahead, but anyone who actually posts the question, or
others that wish to see the answer(s), would like to skip through those
philibusters.


So skip them, then.
I have the honor to remain your most humble and Ob't Sv't in our war
against the King.


AH, now I see - empty words that mean nothing to the person uttering
them. Thanks for clarifying that.


Ah, no, my dear compatriot,
All of this means something, but you do not understand, as this was an
explanation to an earlier post. Secondly, one cannot skip those
philibustering posts, as they are still posts, and one cannot minimize
them, nor can they know whether or not they are philibusters until they
read the post. Thirdly, when you say that one convenes to the will of
the repliers, that is true, but what I am saying is that the repliers
could have some kind of courteousy and keep the discussion on track
without any tangents.
By the way, it doesn't really matter any more, the original questioner
may think I am contradicting myself, although it is others that are
causing me to contradict myself.

And as an extra comment, the signature has a completely valid reason,
it is not empty nor meaningless. It means everything it says.

I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

May 10 '06 #24
To further the education of mankind, "pe********************@gmail.com"
<pe********************@gmail.com> vouchsafed:
By the way, it doesn't really matter any more, the original questioner
may think I am contradicting myself, although it is others that are
causing me to contradict myself.


That says it all...

--
Neredbojias
Infinity has its limits.
May 10 '06 #25
pe********************@gmail.com wrote:

Ah, no, my dear compatriot,
All of this means something, but you do not understand, as this was an
explanation to an earlier post.
condescension, too. Wow, you're so "humble"
Secondly, one cannot skip those
philibustering posts, as they are still posts,
Someone's forcing you to read them?
and one cannot minimize
them, nor can they know whether or not they are philibusters until they
read the post. Thirdly, when you say that one convenes to the will of
the repliers, that is true, but what I am saying is that the repliers
could have some kind of courteousy and keep the discussion on track
without any tangents.
Why do you get to determine how people should behave in a forum that YOU
are the newcomer to? Who are YOU to determine what is or is not
courteous in this forum?
By the way, it doesn't really matter any more, the original questioner
may think I am contradicting myself, although it is others that are
causing me to contradict myself.
Ah, I see, it's not your fault.
And as an extra comment, the signature has a completely valid reason,
it is not empty nor meaningless. It means everything it says.
And since what it says refers to something that happened over 200 years
ago, it is meaningless.
I have the honor to remain your most humble and Ob't Sv't in our war
against the King.


Get stuffed.
May 10 '06 #26
> A typical format is:

function validate(form) {
if (!valid) {
alert('Error message.');
return false;
}
return true;
}

<form ... onsubmit="return validate(this);">


Doesn't this still create a dependancy on the scripting language (which
you said should be avoided)?

May 10 '06 #27
On 10/05/2006 07:11, AndyZa wrote:

[MLW:]
function validate(form) {
if (!valid) {
alert('Error message.');
return false;
}
return true;
}

<form ... onsubmit="return validate(this);">


Doesn't this still create a dependancy on the scripting language (which
you said should be avoided)?


No. If scripting isn't supported or enabled, the form will behave as if
the intrinsic event listener wasn't there; it will be submitted straight
to the server (assuming one uses submit buttons).

This approach to form validation allows the client-side component to be
optional. If available, it will provide instant feedback to the user,
rather than requiring them to wait for the server to send back an error
response. It will also mean that the server won't have to deal with the
more trivial errors, though it must still be ready to handle them. In
short, it provides convenience.

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
May 10 '06 #28
> No. If scripting isn't supported or enabled, the form will behave as if
the intrinsic event listener wasn't there; it will be submitted straight
to the server (assuming one uses submit buttons).


Mmm... I like it!

May 11 '06 #29

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

Similar topics

9
by: Pedro Graca | last post by:
<?php function ugly_array() { return array(1, 2, 3, 4, 5); } $arr = ugly_array(); echo $arr; ?> not so ugly :) now ... I want to get rid of the $arr temporary variable.
9
by: flarkblark | last post by:
I recently had the displeasure of looking at the code required to implement the pop-up menus used in a pulldown menu system for a webpage. The sheer amount of Javascript required was amazing...
6
by: Quick Function | last post by:
Hi, I developed a site and used css. I put almost all style information in the css and used a lot of "id=my_css_class" in the html. They is little style specification in the html. I found that on...
5
by: yxq | last post by:
Hello I am using VS.Net 2002, my icons of XP type look ugly, and i have saw the article. i have added the manifest file. Sometime the icons show very good, but sometime the icons look very...
23
by: Dennis Sjogren | last post by:
Hi! I have this medium sized solution with a couple of projects and stuff. The generated application has an <appname>.exe.manifest file to enable XP themes. In the main window of the application...
5
by: adh | last post by:
Winforms Datagrid Qoute (MSDN): Expanders are displayed in each parent row that contains a child table. Clicking an expander generates a list of Web-like links to the child tables, which when...
7
by: teo | last post by:
I have to validate the user input to prvent HTML injection. I use validateRequest=True and when a potentially malicious input occurs AspNet immediately sends its ugly page about the...
5
by: Jim Langston | last post by:
I've been working on a project to map a MySQL database to a C++ class. Well, I actually got it to work, but some if it I just feel is exceptionally ugly. For example, in my operator<< override: ...
20
by: benhoyt | last post by:
Hi guys, I've been using Python for some time now, and am very impressed with its lack of red tape and its clean syntax -- both probably due to the BDFL's ability to know when to say "no". ...
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: 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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.