Click to See Complete Forum and Search --> : Need a lil help on certralized new window


shard
10-24-2003, 10:45 PM
Hello everyone!

i am using this script to centeralize a new window that opens up when a link is clicked:

<script language="javascript" type="text/javascript">
var sw = parseInt(window.screen.availWidth);
var sh = parseInt(window.screen.availHeight);
var winX = parseInt(sw/2);
var winY = parseInt(sh/2);
var l = (document.all)?"left="+((winX/2)-20):"screenX="+((winX/2)-16);
var t = (document.all)?"top="+((winY/2)-20):"screenY="+((winY/2)-16);

window.moveTo(l,t);
window.focus();
</script>

this script is in the head tag of the window that is opened... the script isn't working... can anyone help me on this please??

sciguyryan
10-25-2003, 04:14 AM
Take a look at webdevfaqs here: http://www.webdevfaqs.com/javascript.php#centeredpopup

shard
10-26-2003, 07:12 PM
Thank you dear sir... but u see what i am after is that the opened window re adjests itself... and its position is not determined when the link is clicked but after it opens up... the basic reason for that is that i wanna use this in flash... and actionscript doesn't support it to the best of my knowledge at least... so what i want is that the opened window moves to the centre itself by some script put into its head tag!

can ya please help me!!!!

sciguyryan
10-27-2003, 08:14 AM
Sorry, I have no idea about how you would do theat - ask charles, pyro or one of the other high renked members - I am sure they will be able to help.

shard
10-28-2003, 01:40 PM
How can i contact them?

sciguyryan
10-29-2003, 04:47 AM
You should find them browsing the forums - look for one of their posts, click on their name thent click the link to send them a PM.