Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to change the row count value of a multi-line textbox

Status
Not open for further replies.

snowboardr

Programmer
Joined
Feb 22, 2002
Messages
1,401
Location
PH
How do you change the row count value of a multi-line textbox?

I couldnt find it on google.

regards,
jason
 
I guess I should have said javascript : but i figured it out...

Code:
function makeSmaller() {
        var fieldTxt = document.getElementById('frmBody1');
        var newheight = fieldTxt.rows - 2;
        fieldTxt.rows = newheight;
	if(newheight < 8) {
		alert('Minimum textbox height reached.')
	} else {
		fieldTxt.rows = newheight;
	}
		
    }


function makeLarger() {
        var fieldTxt = document.getElementById('frmBody1');
        var newheight = fieldTxt.rows + 2;
		
	if(newheight > 40) {
		alert('Max textbox height reached.')
	} else {
		fieldTxt.rows = newheight;
	}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top