Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder crmpicco's Avatar
    Join Date
    Jan 2005
    Location
    Mauchline, Scotland
    Posts
    1,097
    Thanks
    15
    Thanked 1 Time in 1 Post

    open the window automatically maximised

    Code:
    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,scrollbars=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

  • #2
    eak
    eak is offline
    Regular Coder eak's Avatar
    Join Date
    Jun 2002
    Location
    Nashville, TN
    Posts
    354
    Thanks
    0
    Thanked 26 Times in 26 Posts
    Code:
    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);
    eak | "Doing a good deed is like wetting your pants; every one can see the results, but only you can feel the warmth."

  • #3
    New Coder
    Join Date
    Apr 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    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

    Code:
    <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)

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Marhanen

    Try your function this way

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

    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #5
    New Coder
    Join Date
    Apr 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i was trying to make it a popup through the text link code

    Thanks alot

    Marhanen

  • #6
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    There was an error in your array index

    PHP Code:
    <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> 
    Last edited by Mr J; 05-07-2006 at 11:27 PM.
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •