Does anyone know if this is possible?
I have a javascript which highlights the table row when a user hovers down it. it now also links to a page when you click it. but i want to add php to my link. Can it be done?
I have attempted it myself but it gives me this error: Parse error: syntax error, unexpected '"', expecting T_STRING
<script>
$(function() {
$('tr').hover(function() {
$(this).css('background-color', '#eee');
$(this).contents('td').css({'border': '0px solid red', 'border-left': 'none', 'border-right': 'none'});
$(this).contents('td:first').css('border-left', '0px solid red');
$(this).contents('td:last').css('border-right', '0px solid red');
},
function() {
$(this).css('background-color', '#FFFFFF');
$(this).contents('td').css('border', 'none');
$('tr').click(function() {
document.location = <?php \"read_message.php?msg={$inbox[0]}\">{$inbox['subject']}"; ?>';
} );
});
});
</script>
<?phpadd a'you aren't opening it. but you are also closing something else after['subject']}"with a"