JavaScript-and-PHP function

Discussion in 'JavaScript' started by TriKri, Aug 8, 2007.

  1. #1
    Is there some way to have a function which can be called from both a JavaScript script and from PHP (for example when validating form data)? One way I can think of is having a PHP function, and making an AJAX request, to a PHP document which will call the function and send back the result. But is there some other simpler way?
     
    TriKri, Aug 8, 2007 IP
  2. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    No (AFAIK). You have to write it in each language.
     
    MMJ, Aug 8, 2007 IP