Results 1 to 2 of 2

Thread: Popup size

  1. #1
    Join Date
    Dec 2005
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Popup size

    Hi all,

    I need some help with popups.

    I am developing a website, when a user clicks a certain link I would like it to open only in a certain size window. How can I do this?

    Thanks,

  2. #2
    Join Date
    Jan 2005
    Location
    Cardiff
    Posts
    449
    Thanks
    10
    Thanked 17 Times in 17 Posts

    Default

    Add this snippet of Javascript in the head of your document:

    Code:
    <script language="JavaScript" type="text/javascript">
    <!--
    function openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    }
    //-->
    </script>
    Then for each link in the body of your page add:
    Code:
    <a href="javascript:;" onmousedown="openBrWindow('http://www.domain.co.uk/target.htm','WindowTitle','width=x,height=y')">Link Text</a>
    adjusting the target url, the WindowTitle the dimensions of the window and the Link Text in the code.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP: Calculating a Directory File Size
    By nick in forum Code Sharing
    Replies: 17
    Last Post: 29th January 2006, 09:32 AM

Bookmarks

Posting Permissions

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