Call JS Function From PHP

View previous topic View next topic Go down

Call JS Function From PHP

Post by jamied_uk on 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>
avatar
jamied_uk
Admin

Posts : 2243
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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