Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.45 KB | None | 0 0
  1.  
  2. in the html page in a div tag has onlclick...:
  3. onclick="<?php printTab()"?>
  4.  
  5. in an javascript function collection
  6. function printTab()
  7. {
  8.     ajax call-> phpFunction()
  9.     target->"targetdiv"
  10. }
  11.  
  12. phpFunction():
  13. {
  14. print '<div><script type="text/javascript">alert("vatafaka");</script></div>';
  15. }
  16.  
  17.  
  18. result html:
  19. ...
  20. <div id"targetdiv">
  21. <script type="text/javascript">alert("vatafaka");</script>
  22. </div>
  23.  
  24. and this is not running after this procedure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement