I have this code
<a href="images/xxx.jpg" download onclick="isEmail()">Click Me</a> <script type="text/javascript"> function isEmail() { $(document).ready(function(){ $.ajax({ type: 'POST', url: 'script.php', success: function(data) { document.write("data"); } }); }); } </script> But the problem is that when you click on the tag, everything disappears except for the script.php itself.
And I need that when clicking on the tag (a) the php code is displayed after javascript
Like so
<script> document.write('<?php echo "<h3>tre</h3>";?>'); </script> <h3>tre</h3>