Forum Moderators: open
example:
<?echo "
<td align=center bgcolor=\"#5647A1\" onClick=\"window.location.href=\'realizace.html\';\"> click here </td> ;"?>
... and it is so even if i put the back slash in front of " string...
CAN ANYONE HELP?
thanx pitat450
Looking briefly at the code, I see two problems: the first is that if you are enclosing your echo with double quotes, you don't need to escape the single quotes around the onclick parapeters. An alternative is to use single quotes for the echo and escape only the single quotes. The second problem is your semi-colon at the end which is placed incorrectly:
Try this (completely untested, mind you):
<?php echo "
<td align=\"center\" bgcolor=\"#5647A1\" onClick=\"window.location.href='realizace.html';\"> click here </td>";?> or alternatively:
<?php echo '
<td align="center" bgcolor="#5647A1" onClick="window.location.href=\'realizace.html\';"> click here </td>';?>