Results 1 to 9 of 9

Thread: limitkan aksara ketika login

  1. #1
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0

    limitkan aksara ketika login

    kepada sesiapa yg tau coding tntg limit aksara ketika login, saya memerlukan bantuan kamu sume..contoh untuk password login just nk 6 aksara sahaja, x boleh lebih atau kurang.kalau terlebih atau terkurang error mesej akan dikeluarkan

  2. #2
    Join Date
    Aug 2006
    Location
    Malaysia
    Posts
    1,576
    Rep Power
    185
    Hi, seek clarification. What is aksara?
    Google search gave me different different aksara things.

  3. #3
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    272
    aksara mean huruf or 'char'

    beih107,
    cari javascript yang trace berapa input huruf dimasukkan.

  4. #4
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0
    Quote Originally Posted by genzy View Post
    Hi, seek clarification. What is aksara?
    Google search gave me different different aksara things.
    mksdnye nak hadkan dalam satu teks tu just ada 6 huruf atau nombor sahaja.kalau lebih atau kurang akan kuarkan mesej error..benda ni cam redundancy la

  5. #5
    Join Date
    Aug 2006
    Location
    Malaysia
    Posts
    1,576
    Rep Power
    185
    Hope it helps.

    CodeAve.com/JavaScript - Textbox Length Validation

    Textbox Length Validation
    A textbox gives you an opportunity to allow people to submit a line of text as input in a form. There are a number of times when you want be certain that the input is not blank and fits within a specific minimum and maximum length range. The following example will only accept text input greater than three characters and less than ten characters. If the range is violated an alert box will display the number of characters entered and the valid length range. This script will also work on <textarear> </textarear> input field.
    Code:
    <html>
    <title>CodeAve.com(JavaScript: Validate Text Input Length)</title>
    <body bgcolor="#FFFFFF">
    <center>
    
    <script Language="JavaScript">
    <!-- 
    function Length_TextField_Validator()
    {
    // Check the length of the value of the element named text_name
    // from the form named form_name if it's < 3 and > 10 characters
    // display a message asking for different input
    if ((form_name.text_name.value.length < 3) || (form_name.text_name.value.length > 10))
    {
    // Build alert box message showing how many characters entered
    mesg = "You have entered " + form_name.text_name.value.length + " character(s)\n"
    mesg = mesg + "Valid entries are between 3 and 10 characters.\n"
    mesg = mesg + "Please verify your input and submit again."
    alert(mesg);
    // Place the cursor on the field for revision
    form_name.text_name.focus();
    // return false to stop further processing
    return (false);
    }
    // If text_name is not null continue processing
    return (true);
    }
    -->
    </script>
    
    <form name="form_name" method="get" action="http://www.codeave.com/html/get.asp" 
    onsubmit="return Length_TextField_Validator()">
    <input type="text" name="text_name">
    <input type="submit" value="Submit">
    </form>
    
    </center>
    </body>
    </html>

  6. #6
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0
    Quote Originally Posted by genzy View Post
    Hope it helps.

    CodeAve.com/JavaScript - Textbox Length Validation



    Code:
    <html>
    <title>CodeAve.com(JavaScript: Validate Text Input Length)</title>
    <body bgcolor="#FFFFFF">
    <center>
    
    <script Language="JavaScript">
    <!-- 
    function Length_TextField_Validator()
    {
    // Check the length of the value of the element named text_name
    // from the form named form_name if it's < 3 and > 10 characters
    // display a message asking for different input
    if ((form_name.text_name.value.length < 3) || (form_name.text_name.value.length > 10))
    {
    // Build alert box message showing how many characters entered
    mesg = "You have entered " + form_name.text_name.value.length + " character(s)\n"
    mesg = mesg + "Valid entries are between 3 and 10 characters.\n"
    mesg = mesg + "Please verify your input and submit again."
    alert(mesg);
    // Place the cursor on the field for revision
    form_name.text_name.focus();
    // return false to stop further processing
    return (false);
    }
    // If text_name is not null continue processing
    return (true);
    }
    -->
    </script>
    
    <form name="form_name" method="get" action="http://www.codeave.com/html/get.asp" 
    onsubmit="return Length_TextField_Validator()">
    <input type="text" name="text_name">
    <input type="submit" value="Submit">
    </form>
    
    </center>
    </body>
    </html>

    tq genzy..awk nyer code mmg da jd utk kuarkan mesej error tu tp utk access ke dlm sistem x success lagi..so di mana nama form yang nk di access tu?adakah kat action dlm form?

  7. #7
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0
    Quote Originally Posted by mysticmind View Post
    aksara mean huruf or 'char'

    beih107,
    cari javascript yang trace berapa input huruf dimasukkan.
    aksara tu char..dh dpt code utk limitkan aksara tu tapi x boleh akses sistem plak..so nama form tu kena letak kat ner?adakah dalam form action atau tempat lain?

  8. #8
    Join Date
    Aug 2006
    Location
    Malaysia
    Posts
    1,576
    Rep Power
    185
    Quote Originally Posted by beih107 View Post
    tq genzy..awk nyer code mmg da jd utk kuarkan mesej error tu tp utk access ke dlm sistem x success lagi..so di mana nama form yang nk di access tu?adakah kat action dlm form?
    That's the client-side validation, for the one using JavaScript.

    For your requirements, you can put "the checking action" in the server-side script. It is called as the server-side validation.

    Conceptually, in the server-side script, playing around with the If-Else and string manipulation on the user input.

    Pseudo Code:

    Write a function that checks the characters using the string manipulation.

    The condition = return the function (user input) value.

    If the condition is true Then
    ..Proceed to the processing part.
    Else
    ..Display the alert message.
    ..Stop
    End If

  9. #9
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0
    Quote Originally Posted by genzy View Post
    That's the client-side validation, for the one using JavaScript.

    For your requirements, you can put "the checking action" in the server-side script. It is called as the server-side validation.

    Conceptually, in the server-side script, playing around with the If-Else and string manipulation on the user input.

    Pseudo Code:

    Write a function that checks the characters using the string manipulation.

    The condition = return the function (user input) value.

    If the condition is true Then
    ..Proceed to the processing part.
    Else
    ..Display the alert message.
    ..Stop
    End If
    example?saya tak dapat imagine server-side script tu ada kat mane

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Free Ccv and Pay-Pal Login
    By skurthacker in forum Member Introductions
    Replies: 0
    Last Post: 18-12-2009, 11:46 PM
  2. login
    By beih107 in forum Website Programming
    Replies: 2
    Last Post: 17-04-2007, 04:05 PM
  3. login
    By annuR in forum Website Programming
    Replies: 2
    Last Post: 18-05-2006, 02:32 PM
  4. session login
    By sheismaria in forum Website Programming
    Replies: 2
    Last Post: 18-05-2006, 02:20 PM
  5. camne nak limitkan db output??
    By sunshine in forum Website Programming
    Replies: 1
    Last Post: 02-09-2003, 04:06 PM

Posting Permissions

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

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37