I Got a project which asks me to make a popup window open automatically on main page load, but in PHP with following details: I want popup window --
1. to a specified size
2. at a specified position
3. with no toolbars
4. with no scrollbars
5. with no address bars
6. with resizable set to no.
7. with location set to no.
8. with no directories
9. with no status bar
10. with no menubar and
11. with no copyhistory
** But the Main window should close automatically as soon as popup gets open with any confirmation.
The Script can contain JavaScript (JS) too, but it has to have PHP too in it
I want to use this on INTRANET (Not Internet) as this is one of my PHP project assigned to me, and i need it urgently.
By far i came up with JavaScript only, like below:
<script type='text/javascript'>
function SetWindow()
{
var height = 400 //Set height
var width = 400 //Set width
var name = "popup" //Set window name
var top = 20 //Set distance from top
var left = 20 //Set distance from bottom
if(document.location.search=='') {
newwin=window.open(document.location + "?newwin=true", name, "fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);
window.open('','_self','');
window.close();
Please if anyone can help me, i'll be grateful him/her. i need to convert this script in PHP or embed in PHP.
1. to a specified size
2. at a specified position
3. with no toolbars
4. with no scrollbars
5. with no address bars
6. with resizable set to no.
7. with location set to no.
8. with no directories
9. with no status bar
10. with no menubar and
11. with no copyhistory
** But the Main window should close automatically as soon as popup gets open with any confirmation.
The Script can contain JavaScript (JS) too, but it has to have PHP too in it
I want to use this on INTRANET (Not Internet) as this is one of my PHP project assigned to me, and i need it urgently.
By far i came up with JavaScript only, like below:
<script type='text/javascript'>
function SetWindow()
{
var height = 400 //Set height
var width = 400 //Set width
var name = "popup" //Set window name
var top = 20 //Set distance from top
var left = 20 //Set distance from bottom
if(document.location.search=='') {
newwin=window.open(document.location + "?newwin=true", name, "fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);
window.open('','_self','');
window.close();
Please if anyone can help me, i'll be grateful him/her. i need to convert this script in PHP or embed in PHP.