473,652 Members | 3,132 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

open a popup in a desired position

Hi,
I have a picturegallery that opens in a new window as a defined size,
but I would like to open the popup in the middle of the screen. Some
browsers do it like that, others don't... Any ideas how I can define the
position for the windows to open in?

Jul 20 '05 #1
4 7115
Use this in your new window

<SCRIPT Language="JavaS cript">
<!--
self.window.mov eTo(0,0); //or let JavaScript calculate the middle
position...that 's up to you...
//-->
</SCRIPT>
"@(none)" <""fredu\"@(non e)"> schreef in bericht
news:3f******** @newsflash.abo. fi...
Hi,
I have a picturegallery that opens in a new window as a defined size,
but I would like to open the popup in the middle of the screen. Some
browsers do it like that, others don't... Any ideas how I can define the
position for the windows to open in?

Jul 20 '05 #2
"@(none)" wrote on 13/11/2003:
Hi,
I have a picturegallery that opens in a new window as a defined size, but I would like to open the popup in the middle of the screen. Some
browsers do it like that, others don't... Any ideas how I can define the position for the windows to open in?


Though you can do this with window.moveTo() , there are some things you
should consider. Please read "Hi, stupid popup question", posted
originally 13:14 on 2003/11/12. Richard Cornford and I have a debate
about positioning windows. Ignore my comments: read his.

Mike

--
Michael Winter
M.Winter@[no-spam]blueyonder.co.u k (remove [no-spam] to reply)
Jul 20 '05 #3
DU
none wrote:
Hi,
I have a picturegallery that opens in a new window as a defined size,
but I would like to open the popup in the middle of the screen. Some
browsers do it like that, others don't... Any ideas how I can define the
position for the windows to open in?

Here's my recommendation. Make your secondary window resizable, with
scrollbars if needed (that is if content overflows requested window
dimensions) and with presence of statusbar. Don't try to position the
window; let the user do that. OTOH, make your requested popup re-usable
so that only and only 1 popup will be used to view all your picture
gallery images. Usability studies have shown that users don't like to
manage multiple windows, browser application instances at the same time.

If images are of different sizes, then you can still make your *script*
open only 1 popup at a time; if the user wants to open all the images in
distinct popups, then your page coding should allow that. Finally I
assure you that there are a few usability issues which are much more
important to deal with than position of popups and which often irritates
users or which make users leave sites using requestd popups: these are
main issues which are usually not taken into consideration.

DU

Jul 20 '05 #4
none wrote:
I have a picturegallery that opens in a new window as a defined size,
but I would like to open the popup in the middle of the screen. Some
browsers do it like that, others don't... Any ideas how I can define the
position for the windows to open in?


You never know the center of the screen, so stop wasting time to think about
it. All you can do is trust the visitor that his UA has client-side script
support and has it enabled, that he will not leave the site when you display
the resource-consuming popup and that he accepts popups where they are shown
by his UA (think about built-in fuzzy-logic positioning, browser tabs and
stuff like that.)
PointedEars
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
6397
by: Markus | last post by:
Hi, i have this problem: Sometimes, i can't reproduce, if i click on an small image on the website, the popup _AND_ an other Tab in firefox open. Here are the linkcode: <div align="center">
3
3791
by: Bob | last post by:
I am trying to create a popup page (to act as a menu) from a parent page. When the parent page (index.jsp) calls my popup function (see below) it will properly open the correct size browser window only if the browser that index.jsp is opened in is NOT maximized. If index.jsp is maximized and then I click on the test link that fires off the openMain function, the browser that is opened for the popup is also maximized. function...
13
6256
by: ldan | last post by:
Hi everybody, I would not consider myself an expert in javascript - but so far whatever I know, helped me reaching my goals. Recently I started to experience a lot of javascript errors related to opening up a popup window in an application I wrote. The error messages are quite diverse: "Object doesn't support this property or method" or "Unspecified error." or "The callee (server ) is not available and disappeared; all connections are...
6
6972
by: VK | last post by:
I'm using window.open method in my script to open poup window. Recently Internet Explorer users reported that the script crashes on their machine with different runtime errors. See the bug: <http://support.microsoft.com/default.aspx?scid=kb;en-us;888021> The statement like myPopup = window.open(args); gives you runtime error and halts the script execution *if a 3rd party
1
5402
by: Jorge Ponte | last post by:
hi I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In that WUC I want have a textbox and a button. I want to click on the button and open a popup (I use javascript for that), the popup window will have also a text box and a button. when the User click on the button the value on the textbox will be send back to the textbox on My_WUC. I hope I was clear off what I want to do. I've been searching for some ideas...
5
7804
by: Nathan Sokalski | last post by:
How do I open and change properties of (such as size, position, scroll position, visibility of toolbars, etc.) a browser window? Thanks. -- Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/
18
2953
by: Colin McGuire | last post by:
Hi - this was posted last weekend and unfortunately not resolved. The solutions that were posted almost worked but after another 5 days of working on the code everynight, I am not further ahead. If you do have any ideas I would really like to hear them. Thanks Colin - 0 - 0 - 0 - I want a glorified popup/context menu on a button that shows only when
0
2007
by: GV | last post by:
Hi all, New to developing in VS 2005 ASP 2.0 Trying to have a easy pop calender for a button on a web page. I keep getting a error message in IE6 that says: Line 69 Char 3 Error: 'this.container' is null or not an object
1
2049
by: chris f | last post by:
Some of the cells in my ASP.NET 2 table have a popup that appears when the user hovers the mouse over a text area that is indicated using an anchor tag. The popup is implemented as a DIV tag (position: relative) and is displayed and hidden using Javascript which calculates the popup position. The table has vertical scrollbars and when the table is scrolled to the very top then the popup is positioned correctly. However, if the table is...
0
8811
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8467
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8589
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5619
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4145
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2703
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1914
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1591
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.