Possible to create multirow button in Firefox ?

J

Jonathan N. Little

Julien said:
Is this possible with Firefox 2 : creating a multi-row HTML button ?

This works with MSIE (versions 6 and 7, and maybe others) :
<input id='btn_CreateProducts' type='submit' value='Create
\rproducts' />"

A screenshot of what I mean is the "Create products" button on this
screenshot :
http://www.altipoint.com/cgiContouring/img/screenshots/en/screenshot7.png

The "\r" carriage return doesn't work with Firefox. Is there any
equivalent?

<input id="btn_CreateProducts" type="submit" value="Create products"
style="width: 5em; white-space: normal;">
 
J

Jonathan N. Little

Jonathan said:
<input id="btn_CreateProducts" type="submit" value="Create products"
style="width: 5em; white-space: normal;">

Note: that above only works in Gecko by my testing. '\r' did not work in
any version of MSIE though, not sure how you accomplished it.
 
J

Julien

(...)
<input id="btn_CreateProducts" type="submit" value="Create products"
style="width: 5em; white-space: normal;">¨

Thanks. I'll try.
Julien

P.S. You made me (re-)discover the em unit that I had completely
forgotten years after I read a HTML & XHTML book.
For those interested in it, here is a good reference about the em
unit: http://www.w3.org/WAI/GL/css2em.htm
 
J

Julien

Note: that above only works in Gecko by my testing. '\r' did not work in
any version of MSIE though, not sure how you accomplished it.

When posting my question, I forgot that this HTML code was written
dynamically by a server side program.
In this progam's language, \r in a string means "carriage
return" (CR). So, it was replaced by a real carriage return in the
button and worked with MSIE.

text$ = "<input id='btn_CreateProducts' type='submit' value='Create
\rproduct' disabled />"
Send(text$)

As in Unix file format, the text file format use the line feed char
(LF) to make new lines, I should try to add a "LF" char after my CR.
Maybe then, it will work also with Firefox. I'll try

On the contrary, I don't have much hope that
(CR) and

(LF) will work for a button as these are HTML/XTHML character
entities.

Julien
 
J

Julien

When posting my question, I forgot that this HTML code was written
dynamically by a server side program.
In this progam's language, \r in a string means "carriage
return" (CR). So, it was replaced by a real carriage return in the
button and worked with MSIE.

text$ = "<input id='btn_CreateProducts' type='submit' value='Create
\rproduct' disabled />"
Send(text$)

I found a ultra-easy way to write a multirow HTML button dynamically:
the linefeed (LF) character must be used to set each new row. This
works with Microsoft Internet Explorer, Firefox and probably other
browsers :
text$ = "<input id='btn_CreateProducts' type='submit' value='Create
\nproduct' disabled />"
Send(text$)

....where \n here inserts a LineFeed character.

Putting a carriage return instead of a linefeed only works with
Microsoft Internet Explorer, not Firefox.

Using only a LF (and no CR) works also on Windows, although the normal
"newline" is normally the CR+LF combination on this OS.

Julien
 
H

Harlan Messinger

Julien said:
Is this possible with Firefox 2 : creating a multi-row HTML button ?

This works with MSIE (versions 6 and 7, and maybe others) :
<input id='btn_CreateProducts' type='submit' value='Create
\rproducts' />"

A screenshot of what I mean is the "Create products" button on this
screenshot :
http://www.altipoint.com/cgiContouring/img/screenshots/en/screenshot7.png

The "\r" carriage return doesn't work with Firefox. Is there any
equivalent?

<input type="submit" name="x" value="On
three
lines?">

works in IE6 and Firefox 2.
 
B

Beauregard T. Shagnasty

Harlan said:
<snip>

<input type="submit" name="x" value="On
three
lines?">

works in IE6 and Firefox 2.

Doesn't work in Opera, Safari, or OffByOne. It /does/ show up with
three lines in the Kompozer editor Preview - but Kompozer (NVu) is the
old Mozilla Composer.

I don't have a ready answer. I do suspect that average visitors might be
confused by a submit button that was not "normal."
 
J

Jukka K. Korpela

Scripsit Julien:
I found a ultra-easy way to write a multirow HTML button dynamically:

Actually, no. And it was bad style to quote a long fragment of discussion,
when it was irrelevant to your message. In future, please quote or
paraphrase _key_ sentence(s) only.
the linefeed (LF) character must be used to set each new row. This
works with Microsoft Internet Explorer, Firefox and probably other
browsers :
text$ = "<input id='btn_CreateProducts' type='submit' value='Create
\nproduct' disabled />"

First, the method used to generate the HTML is irrelevant when considering
the HTML issue.

Second, it only "works" due to browser bugs. Stay tuned to getting fixed
when browsers improve.
...where \n here inserts a LineFeed character.

Putting a carriage return instead of a linefeed only works with
Microsoft Internet Explorer, not Firefox.

By HTML specs, CR, LF, and CR LF pair all all equivalent to each other and
to the space character. So what browsers do is not just odd, it's incorrect.

Years ago, when the question "how to divide button text on two line" was
asked more often, I wrote the page
http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html
that explains this issue, among others.

Apparently authors don't try such things any more. I think they learned the
lesson by experience rather than from my page, but anyway, the lesson is:
keep button text so short that it fits on one line without difficulties. Any
explanations should precede the button rather than being included into it.
The text "Create" is fine, if the context makes it clear what is being
created, as it should anyway. The text "Create product" is actually fine
too, and it does not cause spacing problems unless you create them.

Setting a width on the button, as discussed, might be harmless in most
cases. But do you really know how wide it should be? You don't know the
font, and you should not be possessed with the idea of "controlling" it.
 
J

J.O. Aho

Julien said:
Is this possible with Firefox 2 : creating a multi-row HTML button ?

This works with MSIE (versions 6 and 7, and maybe others) :
<input id='btn_CreateProducts' type='submit' value='Create
\rproducts' />"

A screenshot of what I mean is the "Create products" button on this
screenshot :
http://www.altipoint.com/cgiContouring/img/screenshots/en/screenshot7.png

The "\r" carriage return doesn't work with Firefox. Is there any
equivalent?

Return carriage is more or less only been used in quick-dos from microsoft,
others been using new line and which is more or less the standard, so I
suggest you make a test with new line (I don't guarantee that it will work).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top