Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pup-up window from a form 1

Status
Not open for further replies.

fergmj

Programmer
Feb 21, 2001
276
US
I have a form in HTML and I use JavaScript to access a FileMaker Pro database.

I have a textarea that contains a form field named "description"

That is an area where visitors to the website can input a description of their problem.

I set the text area to 6 rows and 80 columns so that it is quite large, however, there may be times when the someone enters information larger than 6/80. I want a way that the user who is reviewing the information already entered in the description field and click on the textarea box and a box will pop-up and auto format the size to show all of the text the original user entered in the description field...so that when the reviewer looks at the info, they don't have to use scroll bars and scroll up and down.

Does anyone know how to do this?

Thanks

Mindy
 
On the reviewer page, a simple solution:

<textarea onfocus=&quot;alert(this.innerText)&quot;>sometext</textarea> jared@eae.net -
 
But I would like it in a pop up box not in an alert message box.

Mindy
 
<script>

function showAll(txt)
{
var spn,doc,h,w;

infowin = window.open(&quot;about:blank&quot;,&quot;winz&quot;,&quot;scrollbars&quot;)
doc = infowin.document;

spn = doc.createElement(&quot;SPAN&quot;)
spn.innerText = txt;
doc.body.appendChild(spn);
doc.body.style.margin = '0px';

h = spn.offsetHeight + 29; //hack?
w = spn.offsetWidth + 28 ; //hack?

h=h<=600?h:600; //set maxwidth
w=w<=800?w:800; //set maxlength

infowin.resizeTo(w,h) // add 12 hack
}

</script>


<textarea onfocus=&quot;showAll(this.innerText)&quot;>
well well well

this was tough and annoying, but fsdfsd

i hope it helps :)
</textarea> jared@eae.net -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top