Krash Posted November 10, 2010 Share Posted November 10, 2010 Trying to get popup window to work in php. Keep getting template parse errors. Here's the code I've been using in HTML: echo ' <a onClick="window.open('annexplayerpop.shtm','popup','height=275,width=425,top=130,left=280,scrollbars=no')" target="popup"><img src="popupbutton-blue-bg.png" title="Popup MP3 Player" border="0" height="45" width="58"></a> '; Link to comment https://forums.phpfreaks.com/topic/218253-popup-window/ Share on other sites More sharing options...
revraz Posted November 10, 2010 Share Posted November 10, 2010 The actual error would be helpful. Link to comment https://forums.phpfreaks.com/topic/218253-popup-window/#findComment-1132523 Share on other sites More sharing options...
Krash Posted November 10, 2010 Author Share Posted November 10, 2010 syntax error, unexpected T_STRING, expecting ',' or ';' Link to comment https://forums.phpfreaks.com/topic/218253-popup-window/#findComment-1132525 Share on other sites More sharing options...
trq Posted November 10, 2010 Share Posted November 10, 2010 You need to escape single quotes within a single quoted string. Link to comment https://forums.phpfreaks.com/topic/218253-popup-window/#findComment-1132528 Share on other sites More sharing options...
Krash Posted November 10, 2010 Author Share Posted November 10, 2010 Been trying that, but can't get it right. Is it a backslash after every closing quote? Ok, got it. Had them in the wrong place. Popup works. Thanks! <a onClick="window.open(\'http://annexplayerpop.shtm\',\'popup\',\'height=275,width=425,top=130,left=280,scrollbars=no\')" target="popup"> Link to comment https://forums.phpfreaks.com/topic/218253-popup-window/#findComment-1132531 Share on other sites More sharing options...
trq Posted November 10, 2010 Share Posted November 10, 2010 You need to get yourself a decent editor at minimum. Nobody should need help with these types of errors. echo ' <a onClick="window.open(\'annexplayerpop.shtm\',\'popup\',\'height=275,width=425,top=130,left=280,scrollbars=no\')" target="popup"><img src="popupbutton-blue-bg.png" title="Popup MP3 Player" border="0" height="45" width="58"></a> '; Link to comment https://forums.phpfreaks.com/topic/218253-popup-window/#findComment-1132532 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.