same thing for the height parameter;
for to set in the centre some popup with images what is better?
what are the difference? 6 7601
On Mar 5, 12:42 pm, den <spam...@not.no twrote:
same thing for the height parameter;
for to set in the centre some popup with images what is better?
what are the difference?
```````-Example-````````
<html>
<head>
<script type="text/javascript">
function openPP(a1){
wWidth=500;wHei ght=30;
relWid=(a1?scre en.width:window .innerWidth)/2; relHgh=(a1?
screen.height:w indow.innerHeig ht)/2
wLeft=(relWid>w Width/2)?relWid-wWidth/2:screenX
wTop=(relHgh>wH eight/2)?relHgh-wHeight/2:screenY+10
window.open("ab out:blank","new P","left="+wLef t+",top="+wTo p
+",width="+wWid th+",height="+w Height)
}
</script>
</head>
<body style="text-align:center">
<button onclick="openPP (0)">Open a window in center of browser</
button>
<button onclick="openPP (1)">Open a window in center of screen</button>
</body>
</html>
On Mar 5, 12:42 pm, den <spam...@not.no twrote:
same thing for the height parameter;
for to set in the centre some popup with images what is better?
what are the difference?
Reposting the example because of text-wrap in last post :
-<html>
-<head>
-<script type="text/javascript">
-function openPP(a1){
-wWidth=500;wHei ght=30;
-relWid=(a1?scre en.width:window .innerWidth)/2;
-relHgh=(a1?scre en.height:windo w.innerHeight)/2
-wLeft=(relWid>w Width/2)?relWid-wWidth/2:screenX
-wTop=(relHgh>wH eight/2)?relHgh-wHeight/2:screenY+10
-window.open("ab out:blank",
"newP","left="+ wLeft+",top="+w Top+",width="+w Width
+",height="+wHe ight)
-}
-</script>
-</head>
-<body style="text-align:center">
-<button onclick="openPP (0)">Open a window in center of browser</
button>
-<button onclick="openPP (1)">Open a window in center of screen</
button>
-</body>
-</html>
On Mar 5, 2:02 pm, scripts.cont... @gmail.com wrote:
On Mar 5, 12:42 pm, den <spam...@not.no twrote:
same thing for the height parameter;
for to set in the centre some popup with images what is better?
what are the difference?
Reposting the example because of text-wrap in last post :
-wLeft=(relWid>w Width/2)?relWid-wWidth/2:screenX
-wTop=(relHgh>wH eight/2)?relHgh-wHeight/2:screenY+10
screenX/screenY works in mozilla only. In opera and IE, it doesn't
work. So check the browser and for other browsers, use screenLeft/
screenTop. sc************* @gmail.com said the following on 3/5/2007 5:24 PM:
On Mar 5, 2:02 pm, scripts.cont... @gmail.com wrote:
>On Mar 5, 12:42 pm, den <spam...@not.no twrote:
>>same thing for the height parameter; for to set in the centre some popup with images what is better? what are the difference?
Reposting the example because of text-wrap in last post :
-wLeft=(relWid>w Width/2)?relWid-wWidth/2:screenX -wTop=(relHgh>wH eight/2)?relHgh-wHeight/2:screenY+10
screenX/screenY works in mozilla only. In opera and IE, it doesn't
work. So check the browser and for other browsers, use screenLeft/
screenTop.
I hope you meant "check the feature" when you said "check the browser".
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
On Mar 5, 5:02 pm, Randy Webb <HikksNotAtH... @aol.comwrote:
screenX/screenY works in mozilla only. In opera and IE, it doesn't
work. So check the browser and for other browsers, use screenLeft/
screenTop.
I hope you meant "check the feature" when you said "check the browser".
I was going to say that but then i was not sure about which feature
will be available in Mozilla but not in Opera, IE and maybe other
browsers. sc************* @gmail.com said the following on 3/5/2007 6:34 PM:
On Mar 5, 5:02 pm, Randy Webb <HikksNotAtH... @aol.comwrote:
>>screenX/screenY works in mozilla only. In opera and IE, it doesn't work. So check the browser and for other browsers, use screenLeft/ screenTop.
I hope you meant "check the feature" when you said "check the browser".
I was going to say that but then i was not sure about which feature
will be available in Mozilla but not in Opera, IE and maybe other
browsers.
That is why you feature detect for screenX or whatever it is that might
work. If the browser supports it, then you use it. If it doesn't, then
you don't worry about it.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Clare Hsiao |
last post by:
Hi,everybody:
How can I use window.open to Open a page in the center of screen?
I know showModalDialog() can,but I have to run both in IE and NN, so I
have to use window.open to open a new page.
Is ther any help?
Thanks a lot.
|
by: Larry R Harrison Jr |
last post by:
I have pull-down menus in javascript and I have the code for opening a link
in a new window. But I want it to open a full-sized window. I can't figure
out the syntax. What I have so far:
Menu5_5_1=new Array("'Lonely Church","javascript:window.open
('http://www.photo.net/photodb/photo?photo_id=2640310')","",0,20,300);
That works fine, except I can't figure out how to modify it to make it open
full-screen.
|
by: pow67 |
last post by:
Is there a javascript statement which can be incorporated in a
hyperlink which will open a new page that fills the screen while
leaving the page with the link open?
Thanks in advance.
CW
|
by: Jensen bredal |
last post by:
Is there any way i can view my web page in full screen mode?
F11 still hhas the internet explorer tool bar.
Many thanks in advance
JB
|
by: tim |
last post by:
can someone tell me which function returns the screen resolution in
java script?
| |
by: Steve Wright |
last post by:
Hi
I'm developing a webpage that needs to include a different stylesheet
depending on the screen resolution.
I know that I could read the resolution in javascript and then do some
sort of stylesheet switcher as part of the onload event but I would
rather link in the correct stylesheet for the resolution in the first
place.
|
by: dE|_ |
last post by:
I have started looking into scripts for screen size detect with the
intention of using them to pick from a number of CSS style sheets tailored
to the size.
Is there a good reason why this is not so commonly done? IE am I wasting my
time?
---dE|_---
|
by: cook |
last post by:
Hi at all
INTO the css file Can I use the expression:
img {width:screen.availWidth}
Work it crossbrowser?
How?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
| |
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
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...
| |