Results 1 to 3 of 3

Thread: textbox....or

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    India
    Posts
    298
    Is is possible to have a multiline textbox in HTML??

    I need to allow users to enter upto 250 characters. I dont want to use the normal textbox....and using a textarea won't allow me to restrict the no. of characters entered.

    Thanx.

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    is this any good?

    Code:
    <HTML>
    <HEAD>
    <script language="JavaScript">
    function x()
    {
    var str = document.frm1.TEXTAREA1.value
    	if(str.length > 250)
    	{
    		document.frm1.TEXTAREA1.value=str.substring(0,250)
    	}
    }
    
    </script>
    </HEAD>
    <BODY>
    <form name=frm1>
    <TEXTAREA name=TEXTAREA1 onKeyUp="x()">
    </TEXTAREA>
    </form>
    </BODY>
    </HTML>
    Mark
    -------------------

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    India
    Posts
    298

    Thumbs up

    it is Mark , Thanx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width