|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Open a new window
Hi!
I call in my php script in <body onunload> a javascrpt function that opens a window. I want that window was very small or stays out off the sreen. I'm using the width,height,left or top parameters, but nothing is happening. If I put them between '' or "", I've got an error. I only could move the window, after she appears in the middle, with win.moveTo(x,y); html> <body> <title></title> </head> <body bgcolor="#FFFFFF" onUnload="logout()"> <script type="text/javascript"> function logout() { var win = window.open('temp.php?Name='+sub_string,width=50,h eight=50) } </script> </body> </html> thanks for your help andre |
|
#2
|
|||
|
|||
|
RE: Open a new window
Try this in your logout function:
Code:
function logout()
{
var page_location = 'temp.php?Name=' + sub_string;
var page_name = 'popup';
var win = window.open(page_location,page_name,'width=50,heig ht=50');
}
|
|
#3
|
|||
|
|||
|
RE: Open a new window
It works. A window could be smaller than 50x50 ? Can I put this window out off screen ?
|
|
#4
|
|||
|
|||
|
RE: Open a new window
I think that Netscape sets the minimum window size to 50x50, but you have more control in IE. You can position it off screen in IE, but I've never tried in netscape.
You could always hide it behind the current window by putting the following code in the pop-up window: Code:
<body onload="window.opener.focus();"> |
|
#5
|
|||
|
|||
|
RE: Open a new window
Use window.moveTo()/window.moveBy() javascript functions to position the window off the screen.Give very large co-ordinate values like 1800,1800.But you wont able to hide its appearance in the task bar.
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Open a new window |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|