Web Analytics Made Easy -
StatCounter Needs to open in a new window - CodingForum

Announcement

Collapse
No announcement yet.

Needs to open in a new window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?
    Nemesis War
    Online browser based space combat game.
    It's free, it's great, you'll love it.
    Come join us at http://www.nemesiswar.net/

  • #2
    Found it already somewhere else using window.open('comms.php'), is there a way I can control the size of the window that opens?
    Nemesis War
    Online browser based space combat game.
    It's free, it's great, you'll love it.
    Come join us at http://www.nemesiswar.net/

    Comment


    • #3
      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; Sep 24, 2006, 11:24 PM.

      Comment


      • #4
        for above, if you want to make it easier, make
        website url
        become
        comms.php
        Last edited by KyuubiKahiera; Sep 24, 2006, 11:45 PM.

        Comment


        • #5
          Originally posted by KyuubiKahiera View Post
          for above, if you want to make it easier, make

          become
          lovely, thanks a lot. Worked as expected.
          Nemesis War
          Online browser based space combat game.
          It's free, it's great, you'll love it.
          Come join us at http://www.nemesiswar.net/

          Comment

          Working...
          X