Reply
Popup window in centre of Screen, Is it possible ?
Old 04-24-2008, 09:35 AM Popup window in centre of Screen, Is it possible ?
Novice Talker

Posts: 5
Name: Luke Kinsella
REF:http://uninformedweb.com/index.php
When i click Lauch Site...it popups up in the top left corner..

Like So -




Is it possible to make it like -



Cheers
Luke
treefingers28 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-24-2008, 10:12 AM Re: Popup window in centre of Screen, Is it possible ?
chrishirst's Avatar
Super Moderator

Posts: 11,506
Location: Blackpool. UK
something like ->> http://www.candsdesign.co.uk/article...-a-disclaimer/
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-24-2008, 10:24 AM Re: Popup window in centre of Screen, Is it possible ?
Novice Talker

Posts: 5
Name: Luke Kinsella
Quote:
Originally Posted by chrishirst View Post
If you got to www.uninformedweb.com/index.php. And click on the link.
The new window popups up in the top left of the screen.
I want it to popup in the centre (vertical and horizontally)
Cheeeers
treefingers28 is offline
Reply With Quote
View Public Profile
 
Old 04-24-2008, 10:39 AM Re: Popup window in centre of Screen, Is it possible ?
chrishirst's Avatar
Super Moderator

Posts: 11,506
Location: Blackpool. UK
Look at the javascript code in my example and see how I make my pseudo dialog pop-up appear in the centre of the browser window.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-25-2008, 03:59 AM Re: Popup window in centre of Screen, Is it possible ?
alfren's Avatar
Novice Talker

Posts: 8
Name: Alfren Enriquez
Location: Davao City, Philippines
I have this code:

Code:
add this in the <head> section
<script language="javascript">

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
</script>

then in your link code:

Code:
<a href="mypage.html" onClick="NewWindow(this.href,'name','900','800','no','no','no');return false">Sample Link</a>
__________________
yo!
alfren is offline
Reply With Quote
View Public Profile Visit alfren's homepage!
 
Reply     « Reply to Popup window in centre of Screen, Is it possible ?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13355 seconds with 13 queries