Jim Lawrence
accessd at shaw.ca
Tue Dec 2 13:54:41 CST 2008
Hi All:
I have been using Google Chrome for the last little while and have been
using a great little HTML feature.
<textarea name="whatever" rows=5 cols=30 wrap=virtual />
</textarea>
If you want to see it in action, stert up Chrome and link:
http://www.mountaindragon.com/html/virtualwrap.htm
Unfortunately, this Virtual feature does not work in either of the current
versions of FF or IE.
I have seen this CSS work around but it is not the same as it does not have
the nice visuals:
<textarea name="whatever"
style="width:310px;height:80px;white-space:pre;overflow:auto;" />
</textarea>
Or a nasty JavaScript function call work-around:
function setWrap(area, wrap) {
if (area.wrap) {
area.wrap= wrap;
} else { // wrap attribute not supported - try Mozilla workaround
area.setAttribute('wrap', wrap);
var newarea= area.cloneNode(true);
newarea.value= area.value;
area.parentNode.replaceChild(newarea, area);
}
}
Are there any better work-arounds out there?
Jim