herghost Posted March 8, 2010 Share Posted March 8, 2010 Hi all, I cant get my close button to work. I am guessing its something to do with all the '! if(isset($_SESSION['delete'])) { echo "<div id='mypopup' name='mypopup' style='position: absolute; width: 120px; height: 120px; display: none; color: #fff; background-image:url(images/button.jpg); border: 1px solid #000;'>" ; echo "<script type='text/javascript'>fireMyPopup()</script>"; echo "<center><br /> <br /> <p>Customer Deleted</p> <input type='submit' value='Close' onClick='document.getElementById('mypopup').style.display = 'none' '></center>"; $_SESSION['delete'] = null; } Whats wrong? Link to comment https://forums.phpfreaks.com/topic/194498-formating-echo-help/ Share on other sites More sharing options...
peter11 Posted March 8, 2010 Share Posted March 8, 2010 i am only starting off at PHP however i think its because you got " around the html try using ' im not sure if this will fix it as im only learning but may aswell try lol Link to comment https://forums.phpfreaks.com/topic/194498-formating-echo-help/#findComment-1022987 Share on other sites More sharing options...
herghost Posted March 8, 2010 Author Share Posted March 8, 2010 i am only starting off at PHP however i think its because you got " around the html try using ' im not sure if this will fix it as im only learning but may aswell try lol That won't do it, you can use either, its something to do with this line onClick='document.getElementById('mypopup').style.display = 'none' '> Link to comment https://forums.phpfreaks.com/topic/194498-formating-echo-help/#findComment-1022989 Share on other sites More sharing options...
MatthewJ Posted March 8, 2010 Share Posted March 8, 2010 single quotes cannot be nested inside other single quotes onClick=\"document.getElementById('mypopup').style.display = 'none'\"> Link to comment https://forums.phpfreaks.com/topic/194498-formating-echo-help/#findComment-1023004 Share on other sites More sharing options...
herghost Posted March 8, 2010 Author Share Posted March 8, 2010 Many Thanks Link to comment https://forums.phpfreaks.com/topic/194498-formating-echo-help/#findComment-1023006 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.