Results 1 to 5 of 5

Thread: A Javascript needed

  1. #1
    Join Date
    Mar 2010
    Posts
    22
    Thanks
    6
    Thanked 1 Time in 1 Post

    Post A Javascript needed

    Hi All,

    I am looking for a javascript which I'm not sure if is possible without Jquery.
    What I want is an inline validation javascript which should do the following:

    1) As I'll be using it in a form so the script will be doing the inline validation to check if the fields have the correct format of data typed in it. e.g. username, email, password, dob, phone number etc.

    2) The User using the form doesnt have to go and submit the form to know that there are required fields which he needs to fill. i.e. Inline validation

    3) In particular when entering the username the the user will be given a message if that username is available or not if not he will be given a few suggestions. ( I reckon there will a php backend script used for this )

    I'm not sure if this is something which can be achieved but if there are some out there can anyone help me with some links or give an idea what can be done to achieve this.

    Thanks

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Jquery is a shortcut way to do things in Javascript; it's never required, but it can certainly help make things shorter/easier.

    1) Complex specified Javascript based on your requirements.

    2) Same as (1)

    3) That requires checking against the database through the server. Ajax and same as the rest with Javascript.


    Try google-- this is not the first time someone has requested these features.


    There are also some (simple) form scripts here:
    http://dynamicdrive.com/dynamicindex16/index.html

    Especially this one might help:
    http://dynamicdrive.com/dynamicindex...uiredcheck.htm



    Additionally, for this to be at all secure you must RE-validate everything once it gets to the server using PHP, CGI, or ASP, etc.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Apr 2010
    Location
    UK
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default A Javascript needed

    Thank you very much for the help and assistance.

    After double checking the path and making sure it was correct, I also noticed there were a few php open statements which still needed to be changed to <?php as well in order to make the screen and JavaScript to work correctly with the version of PHP being used on the server.

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,035
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Additionally, for this to be at all secure you must RE-validate everything once it gets to the server using PHP, CGI, or ASP, etc.
    If your response was related to this, note that I did not mean validate the html of the page: I am talking about the information submitted.
    Javascript can be faked by the user, so you will need a server side script (like PHP) that will recheck the submitted information to be sure that someone didn't ignore/trick/disable the javascript check on the page.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Tags for this Thread

Bookmarks

Posting Permissions

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