I try to show a php page in javascript pop-up, is there posobility to open a page in pop-up ?
I have solutions to open a new page,but I would like to show page content in pop-up window...
<script>
function popupCenter(pageURL, title, w, h) {
var left = (screen.width / 2) - (w / 2);
var top = (screen.height / 2) - (h / 2);
var targetWin = window.open(pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}
</script>
<a href="#" onclick="popupCenter('test.php')">show</a>
Also, try something with litebox,but no success...
Tnx, P
<script language="javascript" type="text/javascript">
<!--
function popitup(url) {
newwindow=window.open(url,'name','height=200,width=150');
if (window.focus) {newwindow.focus()}
return false;
}
// -->
</script>
Put your page in here
<a href="popup.php" onclick="return popitup('popup.php')"
>Link to popup</a>
Don't forget to give 2 places your page name. in href and inside a function.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.