468,746 Members | 1,879 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,746 developers. It's quick & easy.

Underline just the S in the Submit Button?

I have a form that I allow the user to use the ALT-S key to submit.

I'd like to have just the S in the Submit button underlined, Is this
possible?

Thanks,
Scott<-
Jul 19 '05 #1
21 4998
Why is this an ASP question? ASP doesn't know what a button is.

<button><u>S</u>ubmit</button>

Please post future client-side questions to an HTML newsgroup...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Scott Townsend" <scott-i@.-N0-SPAMplease.enm.com> wrote in message
news:OW*************@tk2msftngp13.phx.gbl...
I have a form that I allow the user to use the ALT-S key to submit.

I'd like to have just the S in the Submit button underlined, Is this
possible?

Thanks,
Scott<-

Jul 19 '05 #2
Scott Townsend wrote:
I have a form that I allow the user to use the ALT-S key to submit.

I'd like to have just the S in the Submit button underlined, Is this
possible?

Thanks,
Scott<-


I do not think this is possible. The text shown on a submit button is set in
the value attribute which can contain only characters (no style properties
....).

You could create an image and use the IMG tag as your Submit button ...

This is more of an HTML issue than as ASP issue so you may wish to ask on a
more HTML-focussed newsgroup.

HTH,
Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #3
Thanks for the Tip.

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:ev*************@TK2MSFTNGP12.phx.gbl...
Why is this an ASP question? ASP doesn't know what a button is.

<button><u>S</u>ubmit</button>

Please post future client-side questions to an HTML newsgroup...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Scott Townsend" <scott-i@.-N0-SPAMplease.enm.com> wrote in message
news:OW*************@tk2msftngp13.phx.gbl...
I have a form that I allow the user to use the ALT-S key to submit.

I'd like to have just the S in the Submit button underlined, Is this
possible?

Thanks,
Scott<-


Jul 19 '05 #4
Aaron Bertrand - MVP wrote:
Why is this an ASP question? ASP doesn't know what a button is.

<button><u>S</u>ubmit</button>


<U> is deprecated:
http://www.w3.org/TR/html401/appendi...idx-deprecated
Fortunately, the same can be accomplished with styles. One example:

BUTTON DIV:first-letter { text-decoration:underline }
-- and --
<BUTTON><DIV>Submit</DIV></BUTTON>

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #5
> <U> is deprecated:

Oh come on now. Let's leave the HTML discussions to a more appropriate
forum. Next we'll be talking about how <button> isn't supported in Netscape
3.0.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #6
Aaron Bertrand - MVP wrote:
<U> is deprecated:


Oh come on now. Let's leave the HTML discussions to a more
appropriate forum. Next we'll be talking about how <button> isn't
supported in Netscape
3.0.


:)
I wasn't even aware there WAS a <button> element. I assumed the OP was
asking about an <input> tag whose type was "submit".

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #7

"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:uw****************@tk2msftngp13.phx.gbl...

Fortunately, the same can be accomplished with styles. One example:

BUTTON DIV:first-letter { text-decoration:underline }
-- and --
<BUTTON><DIV>Submit</DIV></BUTTON>


Isn't that :first-letter pseudo class only supported by Opera or something?

Ray at work
Jul 19 '05 #8
You can hook any event to a <button>, a form submit, an alert();, a function
pickMyNose();, etc.

But let's stay on topic! "<u> is deprecated." I oughta... let me know when
you come across a browser that stops supporting the <u> tag.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

I wasn't even aware there WAS a <button> element. I assumed the OP was
asking about an <input> tag whose type was "submit".

Jul 19 '05 #9
Aaron Bertrand - MVP wrote:
<U> is deprecated:


Oh come on now. Let's leave the HTML discussions to a more
appropriate forum. Next we'll be talking about how <button> isn't
supported in Netscape
3.0.


Please.

Keeping an eye to the future is far different from bending over backward to
work in the past. Nobody uses Netscape 3 anymore, but all of us will use
future browsers. And deprecating <U> has been on the table for seven years:
http://www.w3.org/TR/WD-html40-97070...tml#h-13.1.1.2

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #10
Ray at <%=sLocation%> [MVP] wrote:

Isn't that :first-letter pseudo class only supported by Opera or
something?


No, and that would be irresponsible:
http://www.w3.org/TR/CSS2/selector.html#x52

IE6, Opera 7, and FireFox 0.8 all dig it. Oddly enough, they all /seem/ to
follow the standard for the pseudo-element. I half expected IE to allow it
on BUTTON, but IE seems to correctly restrict it to block-level elements.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #11
> follow the standard for the pseudo-element. I half expected IE to allow it
on BUTTON, but IE seems to correctly restrict it to block-level elements.


So your solution doesn't work for IE? ;-)
Jul 19 '05 #12
Aaron Bertrand - MVP wrote:

...let me know when you come across a browser that stops
supporting the <u> tag.


I know of plenty, if one of these is present:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #13
Come on Dave, is this an ASP forum or not?

<bored of HTML crap>

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:#t**************@tk2msftngp13.phx.gbl...
Aaron Bertrand - MVP wrote:

...let me know when you come across a browser that stops
supporting the <u> tag.
I know of plenty, if one of these is present:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.

Use of this email address implies consent to these terms. Please do not contact me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Jul 19 '05 #14
Aaron Bertrand - MVP wrote:
follow the standard for the pseudo-element. I half expected IE to
allow it on BUTTON, but IE seems to correctly restrict it to
block-level elements.


So your solution doesn't work for IE? ;-)


On the contrary. I never give solutions that don't work in IE, Mozilla AND
Opera -- at least not when there is a cross-browser solution or when I'm
qualifying it as such.

And my base standard isn't very high -- pretty much anything that will work
in IE 5 or Mozilla 1. That encompasses most of HTML4, CSS1, and DOM Level 1,
plus good chunks of DOM2/CSS2.

I should confess that I consider using deprecated elements no great sin.
Even if my browser doesn't see the underlined first letter, I am essentially
unaffected.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #15
Aaron Bertrand - MVP wrote:
Come on Dave, is this an ASP forum or not?

<bored of HTML crap>


No. Is it a VBScript one?

<bored with VBScript crap>

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #16
> No. Is it a VBScript one?

<bored with VBScript crap>


I can write ASP in several languages, including VBScript. It just happens
to be the language used in 95% of the ASP pages I have seen or worked with.

I can not write ASP code in HTML (whether I prefer VBScript, JScript,
PerlScript, what have you). HTML is merely a by-product of ASP... granted,
it is the desired result. But differences in HTML output or interpretation
have *ALWAYS* been redirected from this group to a more appropriate
client-side group. Because the end result is in question, and that end
result could have been created from ColdFusion, Perl, etc etc.

Discussions about whether a specific HTML tag can be proven to be invalid
with one-off things like DOCTYPE declarations are not on-topic here.

Discussions about ASP techniques (which happen to be demonstrated in
VBScript, for the most part) certainly are. And of course if ever a user
says, "that's all fine and good, but I want my answer in JScript" they are
accommodated.

Just because you prefer JScript doesn't make VBScript off-topic.
Client-side VBScript, hey I'm with you there, as with clinet-side JScript.
But server-side? Not a chance.

If you just want to talk JScript without the ASP part, and without the
majority of the population polluting your discussion environment with
VBScript crap, might I suggest microsoft.public.scripting.jscript?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #17
"Aaron Bertrand - MVP" wrote in message
news:uK**************@tk2msftngp13.phx.gbl...
: > follow the standard for the pseudo-element. I half expected IE to allow
it
: > on BUTTON, but IE seems to correctly restrict it to block-level
elements.
:
: So your solution doesn't work for IE? ;-)

It works.

http://kiddanger.com/lab/submit.html

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #18
"Aaron Bertrand - MVP" wrote in message
news:OD**************@TK2MSFTNGP11.phx.gbl...
: > <U> is deprecated:
:
: Oh come on now. Let's leave the HTML discussions to a more appropriate
: forum. Next we'll be talking about how <button> isn't supported in
Netscape
: 3.0.

Hmmm... who was the first to post with an HTML response? (O:=
Jul 19 '05 #19
> Hmmm... who was the first to post with an HTML response? (O:=

And did you read the whole response?

Seriously now...
Jul 19 '05 #20
"Aaron Bertrand [MVP]" wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl...
: > Hmmm... who was the first to post with an HTML response? (O:=
:
: And did you read the whole response?
:
: Seriously now...

Yes I did and I totally agree with you! *faint* Seriously. I just thought
it was humorous since you provided the first answer, even though you did
direct the OP to a client-side NG. Just poking fun. (O:=

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #21
Aaron Bertrand [MVP] wrote:
Come on Dave, is this an ASP forum or not? No. Is it a VBScript one?


I obviously meant to say, "Yes". It clearly is an ASP forum, and not an HTML
one.

I can write ASP in several languages, including VBScript. It just
happens to be the language used in 95% of the ASP pages I have seen
or worked with.
This alone hardly makes VBScript a more appropriate topic. While you can use
ASP to create something other than HTML, certainly over 95% of the ASP
scripts you have seen create HTML.

Discussions about whether a specific HTML tag can be proven to be
invalid with one-off things like DOCTYPE declarations are not
on-topic here.
They are certainly no less valid than
WSH/CSH discussions
CDO -vs- CDONTS
objRS.getRows() -vs- iteration
REMOTE_ADDR -vs- REMOTE_HOST
inline SQL -vs- stored procedures
IIS configuration topics which have nothing to do with
ASP, such as Directory Security options
Language-specific questions, such as escaping quotes,
formatting numbers, or dealing with computational error
Top/bottom/inline quoting

Not one of the above is an ASP issue, but all are appropriate for discussion
here while HTML is not? Please.

Just because you prefer JScript doesn't make VBScript off-topic.
I agree - just as your boredom with HTML renders HTML neither on-topic nor
off. Not being an ASP topic is what makes VBScript off-topic.

If you just want to talk JScript without the ASP part, and without the
majority of the population polluting your discussion environment with
VBScript crap, might I suggest microsoft.public.scripting.jscript?


Straw man. I never suggested anything of the kind, and suspect you are being
intentionally obtuse here.

Contrary to that sentiment, I take the inclusive attitude. some diversions
are related closely enough to warrant brief discussion. This thread no
longer fits, IMO. It has little relationship to ASP and even less to
brevity.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #22

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Haines Brown | last post: by
5 posts views Thread by Brent McIntyre | last post: by
6 posts views Thread by dfoster | last post: by
1 post views Thread by CARIGAR | last post: by
xarzu
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.