how to call a function in javascript from ihtml or php?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nirmalsingh
    New Member
    • Sep 2006
    • 218

    how to call a function in javascript from ihtml or php?

    i just want to send data from php or ihtml to javascript. how could i these?
  • b1randon
    Recognized Expert New Member
    • Dec 2006
    • 171

    #2
    Originally posted by nirmalsingh
    i just want to send data from php or ihtml to javascript. how could i these?
    Do this by writing your javascript dynamically with PHP. For example:

    [PHP]
    <script>
    var phpData = "<? echo $data ?>";
    </script>
    [/PHP]

    Comment

    • krishna5
      New Member
      • Feb 2007
      • 4

      #3
      Originally posted by b1randon
      Do this by writing your javascript dynamically with PHP. For example:

      [PHP]
      <script>
      var phpData = "<? echo $data ?>";
      </script>
      [/PHP]
      Actually what i need is, i have one java script file and a php file. i have to call a function in java script from the php file. can you give solution to handle this situation.

      Comment

      Working...