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? Quote Link to comment 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>"; Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.