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 5 of 5
  1. #1
    New Coder
    Join Date
    Sep 2006
    Posts
    92
    Thanks
    4
    Thanked 1 Time in 1 Post

    Needs to open in a new window

    Hi,

    I am using onclick and need to have this opened in a new blank window.
    Tried to use target="_blank" but this doesn't work.

    <input type='button' value='Comms Panel' style='width:140px' onclick="window.location.href='comms.php'">

    Any ideas?

  • #2
    New Coder
    Join Date
    Sep 2006
    Posts
    92
    Thanks
    4
    Thanked 1 Time in 1 Post
    Found it already somewhere else using window.open('comms.php'), is there a way I can control the size of the window that opens?

  • #3
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by twomt View Post
    Found it already somewhere else using window.open('comms.php'), is there a way I can control the size of the window that opens?
    lol this is one thing i know how to do
    here's an example

    Code:
    <html>
    <header>
    <title>Page Title</title>
    </header>
    <body>
    <left>
    <h2><b>Page Header</b></h2>
    <script type="text/javascript">
    <!--
    function popup(mylink, windowname)
    {
    if (! window.focus)return true;
    var href;
    if (typeof(mylink) == 'string')
       href=mylink;
    else
       href=mylink.href;
    window.open(href, windowname, 'width=1100,height=775,scrollbars=yes');
    return false;
    }
    //-->
    </script>
    <a href="website url" onClick="return popup(this, 'notes')">text</a>
    </left>
    </body>
    <html>
    NOTICE: parts of it that you fill in will be underlined
    Last edited by KyuubiKahiera; 09-25-2006 at 03:24 AM.

  • #4
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    for above, if you want to make it easier, make
    website url
    become
    comms.php
    Last edited by KyuubiKahiera; 09-25-2006 at 03:45 AM.

  • #5
    New Coder
    Join Date
    Sep 2006
    Posts
    92
    Thanks
    4
    Thanked 1 Time in 1 Post
    Quote Originally Posted by KyuubiKahiera View Post
    for above, if you want to make it easier, make

    become
    lovely, thanks a lot. Worked as expected.


  •  

    Posting Permissions

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