Results 1 to 2 of 2

Thread: Onkeypress error

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2005
    Posts
    9

    Onkeypress error

    hi,
    Every body i m working On the project the most essentiol part of the project is that i have text field which should hold numric data i want that when i press other than numeric data it show message box that you donot type this data here i have done but problem is that text show message box
    bux when i click ok button the key i pressed is posted on the text
    let
    12t
    when i press t it will show error but also post it in text box
    i want that it should clear t but why i m in java script programer
    please tell the code

    Code:
    function validing()
    {
    if (document.form.text1.value=='t')
    show error
    else not
    show error
    <intput type="text" name="text1" onkeypress()="validing()">


    Last edited by Jeaysindh; Apr 14th, 2005 at 06:34 AM. Reason: writig cod

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