PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Call JS Function From PHP

Go down

Call JS Function From PHP Empty Call JS Function From PHP

Post by jamied_uk 5th May 2016, 17:35

Code:
echo '<script type="text/javascript">'
   , 'jsfunction();'
   , '</script>'
;


Or escaped chars version



Code:
<?php
// some php stuff
?>
<script type="text/javascript">
  jsFunction();
</script>


Code:
public function PHPFunction(){
echo '<script type="text/javascript">
test();
      </script>';
    }
    <script type="text/javascript">
    public function test(){
        alert('In test Function');
    }
    </script>
jamied_uk
jamied_uk
Admin

Posts : 2942
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum