mpempas Posted June 10, 2009 Share Posted June 10, 2009 Hello, im trying to make a link and when click on it it will open a link to a small win (i have that code and its working) but i cant make it work with php Thisi s the original code wihich is working with html <a href="javascript:ReadAnnouncement(' $row['id_press'];',' $row['id_press'];');"> echo "<td class='selOverview'><a href=\"javascript:ReadAnnouncement(' $row['id_press'];',' $row['id_press'];')" . $row['title'] . "</a></td>"; Any help pls? Link to comment https://forums.phpfreaks.com/topic/161729-solved-trying-to-use-php-code-and-java-to-open-on-extra-small-win/ Share on other sites More sharing options...
J.Daniels Posted June 10, 2009 Share Posted June 10, 2009 It looks like you are missing a quote on the href and not closing the a tag echo "<td class='selOverview'><a href=\"javascript:ReadAnnouncement(' $row['id_press'];',' $row['id_press'];')\">" . $row['title'] . "</a></td>"; Link to comment https://forums.phpfreaks.com/topic/161729-solved-trying-to-use-php-code-and-java-to-open-on-extra-small-win/#findComment-853376 Share on other sites More sharing options...
mpempas Posted June 10, 2009 Author Share Posted June 10, 2009 Thank you for yout reply J no something else is wrong Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in Link to comment https://forums.phpfreaks.com/topic/161729-solved-trying-to-use-php-code-and-java-to-open-on-extra-small-win/#findComment-853378 Share on other sites More sharing options...
J.Daniels Posted June 11, 2009 Share Posted June 11, 2009 Sorry about that echo "<td class='selOverview'><a href=\"javascript:ReadAnnouncement('".$row['id_press'].";','".$row['id_press'].";')\">" . $row['title'] . "</a></td>"; Try this. There may be an extra quote in the javascript portion. Link to comment https://forums.phpfreaks.com/topic/161729-solved-trying-to-use-php-code-and-java-to-open-on-extra-small-win/#findComment-853402 Share on other sites More sharing options...
haku Posted June 11, 2009 Share Posted June 11, 2009 java and javascript are two entirely different things. Link to comment https://forums.phpfreaks.com/topic/161729-solved-trying-to-use-php-code-and-java-to-open-on-extra-small-win/#findComment-853404 Share on other sites More sharing options...
mpempas Posted June 11, 2009 Author Share Posted June 11, 2009 thank you so much J, working perfect @haku: i try to edit my post when ive notice my mistake but i could. Sorry about that Link to comment https://forums.phpfreaks.com/topic/161729-solved-trying-to-use-php-code-and-java-to-open-on-extra-small-win/#findComment-853408 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.