...

View Full Version : open the window automatically maximised



crmpicco
05-04-2006, 05:17 PM
function pdfPopUp(contId)
{
temp="includes/pdfPop.asp?contractId=";
temp+=contId;
popWin=window.open(temp,null,"height=600,width=800,top=0,left=0,status=yes,toolbar=yes,menubar=no,location=no,resizable=yes,scroll bars=no,channelmode=yes");
popWin.focus();
}


this is my js function.

how do i open the window automatically maximised? (not fullscreen). just full window size?

danke.

Picco

eak
05-06-2006, 10:49 PM
var w=window.screen.availWidth;
var h=window.screen.availHeight;
var f="width="+w+",height="+h;
window.open("http://some.url.com/","some_window_name",f);

marhanen
05-07-2006, 01:22 AM
since this is about opening new window maximised, here's my dilemma

i have this code but i can't seem to figure out how to get it to pop up in a new window



<li>
<script>
<!--
/*
Random link button- By JavaScript Kit (http://javascriptkit.com)
Over 300+ free scripts!
This credit MUST stay intact for use
*/

//specify random links below. You can have as many as you want
var randomlinks=new Array()

randomlinks[0]="http://cmrpg.net/index2.php?action=signup&ref=22304"
randomlinks[2]="http://cmrpg.net/index2.php?action=signup&ref=9550"
randomlinks[3]="http://cmrpg.net/index2.php?action=signup&ref=19923"

function randomlink(){
window.location=randomlinks[Math.floor(Math.random()*randomlinks.length)]
}


//-->
</script>
<a href="javascript:randomlink()">Join Crimson Moon</a>
</li>


</ul>
<hr>
</div>

thanks
marhanen

clan site (under construction) (http://www.freewebs.com/apostlesclan)

Mr J
05-07-2006, 09:30 AM
Marhanen

Try your function this way


function randomlink(){
indexNum=Math.floor(Math.random()*randomlinks.length)
myWin=window.open(randomlinks[indexNum])
}

marhanen
05-07-2006, 06:18 PM
i was trying to make it a popup through the text link code :D

Thanks alot

Marhanen

Mr J
05-07-2006, 11:22 PM
There was an error in your array index


<script>
<!--
/*
Random link button- By JavaScript Kit (http://javascriptkit.com)
Over 300+ free scripts!
This credit MUST stay intact for use
*/

//specify random links below. You can have as many as you want
var randomlinks=new Array()

randomlinks[0]="http://cmrpg.net/index2.php?action=signup&ref=22304"
randomlinks[1]="http://cmrpg.net/index2.php?action=signup&ref=9550"
randomlinks[2]="http://cmrpg.net/index2.php?action=signup&ref=19923"

function randomlink(){
indexNum=Math.floor(Math.random()*randomlinks.length)
myWin=window.open(randomlinks[indexNum])
}


//-->
</script>

<a href="javascript:randomlink()">Join Crimson Moon</a>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum