Ive been looking around, and I really wanted a textarea that extends horizontally as you type only to the page width of course, and when you hit enter, the textarea extends vertically. Moreover, i wrote a script that takes the innerHTML of an element and places it in a textarea, how can i make the 'dynamic' textarea become the size of the text it inherited.
here is an examle of an extending textarea that doesnt work in FF but does in safari.
http://www.felgall.com/jstip45.htm
here is my get page width
and right now heres how im setting the width and heigh of the textareaCode:var pageX = (document.all)?document.body.offsetWidth:window.innerWidth;
and then applying it to the textarea, element yCode:style_w = (document.getElementById(cur_id))?document.getElementById(cur_id).offsetWidth:window.innerWidth; style_h = (document.getElementById(cur_id).style.offsetHeight);
thanks to anyone who can help me out!Code:y.style.width = style_w; y.style.height = style_h;



Reply With Quote
Bookmarks