Znalazłem na necie przykład okienka popup w ajax. Niestety nie za bardzo znam ten język.
Czy może ktoś mi pomóc jak do niego przekazać parametr z php ?
Tak wygląda kod
<script type='text/javascript'> function myPopupRelocate() { var scrolledX, scrolledY; if( self.pageYOffset ) { scrolledX = self.pageXOffset; scrolledY = self.pageYOffset; } else if( document.documentElement && document.documentElement.scrollTop ) { scrolledX = document.documentElement.scrollLeft; scrolledY = document.documentElement.scrollTop; } else if( document.body ) { scrolledX = document.body.scrollLeft; scrolledY = document.body.scrollTop; } var centerX, centerY; if( self.innerHeight ) { centerX = self.innerWidth; centerY = self.innerHeight; } else if( document.documentElement && document.documentElement.clientHeight ) { centerX = document.documentElement.clientWidth; centerY = document.documentElement.clientHeight; } else if( document.body ) { centerX = document.body.clientWidth; centerY = document.body.clientHeight; } var leftOffset = scrolledX + (centerX - 250) / 2; var topOffset = scrolledY + (centerY - 200) / 2; document.getElementById("mypopup").style.top = topOffset + "px"; document.getElementById("mypopup").style.left = leftOffset + "px"; } function fireMyPopup() { myPopupRelocate(); document.getElementById("mypopup").style.display = "block"; document.body.onscroll = myPopupRelocate; window.onscroll = myPopupRelocate; } </script> <div id='mypopup' name='mypopup' style='position: absolute; width: 250px; height: 200px; display: none; background: #ddd; border: 1px solid #000;'> <input type='submit' value=' Close me! ' onClick='document.getElementById("mypopup").style.display="none"'> </div> <input type='submit' value=' Fire ! ' onClick='fireMyPopup()'>
Będę szalenie zobowiązany
pozdrawiam
Redelek