Web Analytics Made Easy -
StatCounter pop up window - CodingForum

Announcement

Collapse
No announcement yet.

pop up window

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

  • pop up window

    How would I on a link click make a window pop up with no scrollbars, and a custom size..say 1/4 the size of the normal window
    ~Designer's Toolz~

  • #2
    Like this:

    Code:
    <script type="text\javascript">
    function popUp(url)
    {
    window.open(url,'new_win','height=400,width=400,scrollbars=no,toolbar=no,resizable=no,menubar=no,directories=no')
    }
    </script>
    Assign your links like this:
    Code:
    <a href="#" onclick="popUp('http://www.codingforum.net')";>Coding Forum</a>
    Keep in mind that many people have pop-up blockers that will prevent them from viewing the content in pop-up windows.

    Edit: Looks like the forum put some additional spaces \ line breaks in the code you'll have to fix that.


    Edit: Oops that's what I get for posting in a rush.

    Basscyst
    Last edited by Basscyst; Feb 26, 2004, 09:12 PM.
    Helping to build a bigger box. - Adam Matthews

    Comment


    • #3
      2 things wrong with that, doesnt work in firefox and in IE it doesnt adjust how wide the window is...only height
      ~Designer's Toolz~

      Comment


      • #4
        <script type="text\javascript">
        function popUp(url)
        {
        window.open(url,'new_win','height=100,width=20','scrollbars=no,toolbar=no,resizable=no,menubar=no,di rectories=no')
        }
        </script>


        that fixes the width but still doesnt work in firebird or firefox...
        ~Designer's Toolz~

        Comment


        • #5
          window.open only has 3 parameters. You have 4. Make the 3rd and 4th parameter as one. Also check if the popup blocker feature is enabled. That will prevent the popup to be opened even if the code is correct.

          And the script tag has incorrect value:

          <script type="text\javascript">

          The backslash should be forward slash.
          Last edited by glenngv; Feb 26, 2004, 09:13 PM.
          Glenn
          vBulletin Mods That Rock!

          Comment

          Working...
          X