![]() |
|
#1
|
|||
|
|||
|
Anybody know how to make a script where the textarea would expand rather than display a scroller? like overflow:visible; would do in IE
thanks in advance |
|
#2
|
|||
|
|||
|
forget it... i figgured it out
|
|
#3
|
|||
|
|||
|
Hmm, care to share the answer with us?
![]() - [url="http://novemberborn.net/"]Mark[/url:aozzibk2gv] |
|
#4
|
|||
|
|||
|
There is something in fogbugz that does this:
[code:it8kbvdtxh] function giveFocus () { if (document.all) // IE only formWithProject.sEvent.focus(); } function adjustRows (textarea) { bUserTyped = true; if (document.all) // IE only { var bGrew = false; while ((textarea.scrollHeight > textarea.clientHeight) && (textarea.rows < 30)) { textarea.rows += 3; bGrew = true; } if ( bGrew ) textarea.scrollTop = 0; } else { var rgLines = textarea.value.split('\n'); var nRows = 1; for ( var i=0; i<rgLines.length; i++ ) { if ( rgLines[i:it8kbvdtxh].length > 80 ) nRows += Math.ceil(rgLines[i:it8kbvdtxh].length/80); } nRows += rgLines.length; if ( nRows > 8 ) textarea.rows = Math.min(nRows, 30); } } [...] <textarea class="bug" name="sEvent" id="sEvent" accesskey="0" rows="8" cols="55" wrap="virtual" onblur="showHelp('');" onkeypress="handleSnippetTargetKeypress(this,event );" onkeyup="adjustRows(this); giveFocus();" onfocus="adjustRows(this); giveFocus(); showHelp('sEvent'); " ></textarea> [/code:it8kbvdtxh] I thought it was pretty sweet actually Ignore the shit about "handleSnippetTargetKeypress" (and "showHelp")that is another feature in fogbugz Works great in IE haven't tested it in shitfox though, looks like it would work -- Regards, Tim Scarfe <dc@developer-x.com> http://www.developer-x.com http://www.dotnetsolutions.ltd.uk |
|
#5
|
|||
|
|||
|
Using FogBugz, Tim? Using a web-app to do your bugtracking?
- [url="http://novemberborn.net/"]Mark[/url:eg0e05or99] |
|
#6
|
|||
|
|||
|
err. well. yes actually.
clients love that sort of shit anyway, gotta admit, I kinda love it too. -- Regards, Tim Scarfe <dc@developer-x.com> http://www.developer-x.com http://www.dotnetsolutions.ltd.uk |
|
#7
|
|||
|
|||
|
Oh man, the irony. Man hates Apple, buys an iPod. Man hates web-based software, uses FogBugz, from the guy who actually wrote an article stating web-based software is the future. The irony!
But hey, as long as the clients pay, who cares? ![]() - [url="http://novemberborn.net/"]Mark[/url:xyq6j31xvy] |
|
#8
|
|||
|
|||
|
Who says I hate web based software? Don't know where you got that one from. Writing web applications was always my speciality until quite recently.
The rich vs reach argument is very valid today but I do believe the future is smart client (for applications). I'm totally buying the Microsoft Longhorn strategy. -- Regards, Tim Scarfe <dc@developer-x.com> http://www.developer-x.com http://www.dotnetsolutions.ltd.uk |
|
#9
|
|||
|
|||
|
this Longhorn strategy being make windows XP a little more like a new linux-based OS and add some enhancements that apple have already implemented?
[url="http://chrispoole.com"]Chris[/url:mmjir3x95d] |
|
#10
|
|||
|
|||
|
fuck it just deleted my rant. Really don't care.
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|