How do you change the size of the new window that a link will open?

Discussion in 'HTML & Website Design' started by newbiesiteguy, Feb 9, 2006.

  1. #1
    I am using dreamweaver 8. When you set the target of a link to open a new window, how do you specify the size of that window?
     
    newbiesiteguy, Feb 9, 2006 IP
  2. fsmedia

    fsmedia Prominent Member

    Messages:
    5,163
    Likes Received:
    262
    Best Answers:
    0
    Trophy Points:
    390
    #2
    You need to use a javascript to specify the actual size. Do a search for 'javascript popup resize' on google and you should get plenty of hits with results about how to do it.
     
    fsmedia, Feb 9, 2006 IP
  3. AMysticWeb

    AMysticWeb Guest

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    AMysticWeb, Feb 9, 2006 IP
  4. stuw

    stuw Peon

    Messages:
    702
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I use a 2 prong approach. I have some javascript in the head of my page and a link to activate it like this:

    <html>
    <head>
    <title>page title</title>
    <script language="JavaScript">
    <!--
    var popUpWin=0;
    function popUpWindow(URLStr, left, top, width, height)
    {
    if(popUpWin)
    {
    if(!popUpWin.closed) popUpWin.close();
    }
    popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
    }
    //-->
    </script>
    </head>
    <body>

    <a href="javascript: popUpWindow('mywindow.html',100,100,370,400)">click here</a>
    </body>
    </html>
     
    stuw, Feb 9, 2006 IP
  5. my44

    my44 Peon

    Messages:
    722
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I normally use what stuw suggest too. The popup window will be customizable according to the page.

    But I'm quite surprised that Dreamweaver doesn't have the option to set the size of the popup window. When I used Dreamweaver aeons ago, I recalled the program did have such setup. Of course now I use FrontPage mostly, and it doesn't offer the same thing as Dreamweaver did.
     
    my44, Feb 10, 2006 IP
  6. newbiesiteguy

    newbiesiteguy Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Im sure it does have it somewhere. But there is so much stuff, and I am still a newb. I have only been using Dreamweaver for a month or so.
     
    newbiesiteguy, Feb 10, 2006 IP
  7. my44

    my44 Peon

    Messages:
    722
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #7
    newbiesiteguy, in that case, probably you can look at the help menu of the Dreamweaver 8. I think by searching a simple keyterm "popup" will guide you to the help files.

    It'll be surprising if Dreamwaver doesn't have this function.
     
    my44, Feb 10, 2006 IP
  8. Homer

    Homer Spirit Walker

    Messages:
    2,396
    Likes Received:
    150
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Umm, yes it does. You can find it under 'behaviors'.
    [​IMG]
    Hope this helps :)
     
    Homer, Feb 10, 2006 IP
  9. stuw

    stuw Peon

    Messages:
    702
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I think it does when you download the extension. I certainly have seen this functionality in DW on other peoples machines.

    Use the DW Extention Manager to download and install from the web.

    Oh hang on, I read Homers post, so there you go.

    But it is worth checking out the extensions and plugins available for dreamweaver if your a bit of a newbie - there's lots of time saving stuff out there for free.
     
    stuw, Feb 10, 2006 IP