JRS: In article <40******@clarion.carno.net.au>, seen in
news:comp.lang.javascript, Steve <nospam@nopes.?> posted at Thu, 27 May
2004 10:15:53 :
I'm opening a small window with window.open. I have a textarea there,
and I want it to expand to fit the window as it's resized. How is this
possible?
How would one do the opposite? I have a function which creates a button
which pops up a window containing a single textarea of specified size in
rows and columns, and it would be nice to have the window of correct
size to fit it. Under the circumstances, it can be assumed that the
necessary window size will fit within the screen size.
What's the best way of determining the number of lines in a function, in
any browser, given only a reference to the function?
MJDtoYMD.toString().replace(/[^\r]/g, "").length + 1 // \r\n ??
MJDtoYMD.toString().split("\r").length
If the FAQ or the Notes have anything on RegExps, a RegExp for newline
could be worth showing; I fear it may need alternatives.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.