calling javascript function in a php code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • archcool
    New Member
    • Oct 2007
    • 2

    #1

    calling javascript function in a php code

    hi iam new to php and i need help

    in my php file i have written php code and as well javascript code.the php code displays a form and i need to validate the fields present in the form calling a javascript function for validation(clie nt side).

    how can i do that?
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Welcome to TSDN!

    You can validate at the time the data is entered in the form input field or validate all input data in in a form before sending off the content to a server.

    For the first option I refer to Javascript tutorial Form at http://www.tizag.com/javascriptT/javascriptform.php

    For the second, see article Form Validation, to be found at the W3Schools website at http://www.w3schools.com/js/js_form_validation.asp

    Hope this will help to get it more clear.

    Ronald

    Comment

    Working...