CD-161Appendix F . Examples from Parts III and (Web design company)
CD-161Appendix F . Examples from Parts III and IV To begin, enter the following into the bottom one-line text field to list the properties of the body object: document.body This displays a long list of properties for the body object. Now enter the following property expression in the top one-line text field to see the scrollHeight property of the output TEXTAREA when it holds the dozens of lines of property listings: document.all.output.scrollHeight The result, some number probably in the hundreds, is now displayed in the output TEXTAREA. This means that you can scroll the content of the outputelement vertically to reveal that number of pixels. Click the Evaluate button once more. The result, 13 or 14, is a measure of the scrollHeight property of the TEXTAREA that had only the previous result in it. The scrollable height of that content was only 13 or 14 pixels, the height of the font in the TEXTAREA. The scrollWidth property of the output TEXTAREA is fixed by the width assigned to the element s COLS attribute (as calculated by the browser to determine how wide to make the textarea on the page). scrollLeft scrollTop NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example Use The Evaluator (Chapter 13) to experiment with these two properties of the TEXTAREA object, which displays the output of evaluations and property listings. To begin, enter the following into the bottom one-line text field to list the properties of the body object: document.body This displays a long list of properties for the body object. Use the TEXTAREA s scrollbar to page down a couple of times. Now enter the following property expression in the top one-line text field to see the scrollTop property of the output TEXTAREA after you scroll: document.all.output.scrollTop elementObject.scrollLeft
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.