Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



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

Posts: 5
Name: Luke Kinsella
Trades: 0
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
 
 
Register now for full access!
Old 04-24-2008, 11:12 AM Re: Popup window in centre of Screen, Is it possible ?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
something like ->> http://www.candsdesign.co.uk/article...-a-disclaimer/
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-24-2008, 11:24 AM Re: Popup window in centre of Screen, Is it possible ?
Novice Talker

Posts: 5
Name: Luke Kinsella
Trades: 0
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, 11:39 AM Re: Popup window in centre of Screen, Is it possible ?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
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!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-25-2008, 04:59 AM Re: Popup window in centre of Screen, Is it possible ?
alfren's Avatar
Novice Talker

Posts: 11
Name: Alfren Enriquez
Location: Davao City, Philippines
Trades: 0
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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.17415 seconds with 12 queries