4
Hey there and thanks both of you for the help.
I think I made the question a little more difficult than nessesary by posting an explanation of the problem rather than the full code, and furthermore make errors in this..
@Dylian yes I was aware, even though I am not very strong in javascript, and the echoing of the define outside the javascript works perfect, but when inside both my take on it, yours and xsells all fail.
I'm pretty sure this is something simple only I seem to be blind to see where it fails.
I'll post the original code here :)
<?php
// Language define in languages/english/admin.php
define ("_AM_INDEXSCAN_CLEAN", "Are you sure you want to delete this file ?");
?>
<?php
// In indexscan/admin/admin.php
echo "<div class='indexscan_suspecious'>".$ff."<span class='indexscan_notxoopsinstall'>"._AM_INDEXSCAN_NOTINXOOPSINSTALL."</span><span class='delete'><a href='index.php?op=delete&name=$ff'><img src='delete.png'></img></a></span></div>";
// function to show confirm
echo "<script type='text/javascript'>
$(function() {
$('.delete').click(function() {
return confirm(<?php echo _AM_INDEXSCAN_CLEAN;?>);
});
});
</script>";
?>
The code is not ready to go yet I was only testing the link, message etc etc