Can i call php file in Javascript file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hpandya
    New Member
    • Jan 2008
    • 9

    Can i call php file in Javascript file

    Because i have javascript functions in the PHP file and i want to call this functions to another .js file.

    Any Idea....

    Thanks in Advance,
    Harsh
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    Originally posted by hpandya
    Because i have javascript functions in the PHP file and i want to call this functions to another .js file.

    Any Idea....

    Thanks in Advance,
    Harsh

    If that PHP file communicates with database, then you may need to use AJAX, but if there is just some processing, then its better for you to convert that PHP function to corrosponding Javascript function.

    Comment

    Working...