Results 1 to 2 of 2

Thread: Javascript calling PHP function

  1. #1
    Join Date
    Oct 2007
    Posts
    3

    Javascript calling PHP function

    Can Javascript call a PHP function?
    eg.
    <a onclick="myphpfunc()">Click me</a> ?

    Thanks for any help you can offer.

  2. #2
    Join Date
    Oct 2007
    Posts
    28
    No. JS is a client-side scripting language. PHP is a server-side scripting language. Best thing to do is have your JS call a .php script to execute on the server side.

Similar Threads

  1. calling javascript function using array values
    By flann in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 12 Sep 2007, 10:06 AM
  2. Axax, Javascript, and PHP... Oh my!
    By deputy963 in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 13 Jun 2007, 08:31 AM

Posting Permissions

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