From: M.L. on


>> There is no URL because I never planned for the invoice form to be on
>> the Internet.
>
>Which part of "www" in the group name did you fail to understand?

Again, I need to remind you that I was redirected here from a
Javascript newsgroup.

>I'd suggest that you hire a consultant instead of posting poorly described
>problems around Usenet.
>
>Oh, and please keep using the same clueless "From" field until you have a
>clue.
From: M.L. on


>> It's important that the invoice be kept to a single page when
>> possible, so I'd prefer not to use a large preset textarea on each
>> row.
>
>If this is in relation to printing, surely you are asking the
>impossible? If the entries in the text area are very large, there
>is no way - except on roll paper printers - that it could be
>contained on one sheet.

I'd prefer handling a single sheet "when possible." I expect a
multi-page invoice on rare occasions though.

>If you are talking the look on the
>screen, why would a big text area make the page anything less
>than a single page, albeit scrolling?

I was focusing on paper printing.
From: dorayme on
In article <7hppt5ts5ljt2elsb1a8f18qmhnren4lcj(a)4ax.com>,
M.L. <me(a)privacy.invalid> wrote:

> >> It's important that the invoice be kept to a single page when
> >> possible, so I'd prefer not to use a large preset textarea on each
> >> row.
> >
> >If this is in relation to printing, surely you are asking the
> >impossible? If the entries in the text area are very large, there
> >is no way - except on roll paper printers - that it could be
> >contained on one sheet.
>
> I'd prefer handling a single sheet "when possible." I expect a
> multi-page invoice on rare occasions though.
>
> >If you are talking the look on the
> >screen, why would a big text area make the page anything less
> >than a single page, albeit scrolling?
>
> I was focusing on paper printing.

So the question remains, how can you print on one sheet a text
box that has been filled in by someone with more text than a
printing sheet could possibly hold?

Please quote properly.

http://www.netmeister.org/news/learn2quote.html

--
dorayme
From: M.L. on


>> I created an HTML invoice form that works well except for the
>> area where I enter the item description. I'd like a CSS solution that
>> will allow my description column to autowrap and expand vertically as
>> I type within the cell. I'd like the entirety of my text to be visible
>> within that cell for printing.
>>
>> I expected this to be a Javascript issue,
>
>It is.
>
><textarea id="my_textarea"></textarea>
>
><div id="my_textarea_display"></div>
>
> If this is just for printing:
>
>1) Read the value of my_textarea
>2) Set the innerHTML of my_textarea_display to that value
>3) Set the display of my_textarea to: none
>
> Those are all easy things to do, Google if you don't know. Then ask.
>
>It's not hard to make an expanding textarea, but it is hard to calculate
>how much is enough, and not too little.
>
> Jeff

After a few deviations I finally got it to work. And it does so
perfectly. My current markup uses an INPUT tag textbox but it'll be
simple to change it to a textarea. Thank you so much for your
Javascript assistance.
From: Ben C on
On 2010-05-01, M.L <me(a)privacy.invalid> wrote:
[...]
> There is no URL because the invoice will be used locally from my flash
> drive and will never be on the Internet. Once I'm done filling out the
> DHTML invoice it will be locally printed for the customer. I'm not
> asking to fix my current DHTML. I'm asking for advice on implementing
> a dynamic feature that does not exist on my current DHTML invoice.
[...]
> Since the form will never be on the Internet, I need a way to
> automatically wrap text and show the textbox or textarea text in its
> entirety either as I type, or after I finished typing inside the cell.
> I want the customer to be able to see the entire description on his
> invoice. I'd like it to work the way an Excel cell works when one sets
> "Autofit Row height" and "Wrap Text."

So in other words there is no server, and no form to submit? In that
case have a normal textarea and a button (called something like
"format") to press when you're finished typing.

The button's handler, in Javascript, gets the text out of the textarea
and puts it into a div instead, which is also switches to display:
block. It then makes the textarea display: none and the div display:
block.

You can have another button (called "edit" perhaps) to swap the div back
with the textarea if you decide you want to edit the text again.

The edit button should be disabled and the format button enabled when
the textarea is displayed, and vice versa when the div is displayed.

Effectively you will have a Web-2.0 non-wysiwyg word processor.

> It's important that the invoice be kept to a single page when
> possible, so I'd prefer not to use a large preset textarea on each
> row.

Another way to do it is present all the text on the page as text
(non-existent initially), but when you click in a table cell or press
some button in it, a div pops up containing a textarea and an "OK
button. You fill in the textarea, press "OK" and it go away and dumps
the text in where you where. This way you can make the textarea nice and
big if you have a lot of places on the page where text needs to be
inserted.