Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Good news everyone! The Boards.ie Subscription service is live. See here: https://subscriptions.boards.ie/

How does one do 'autofit' for popup?

  • 05-04-2005 03:59PM
    #1
    Registered Users, Registered Users 2 Posts: 1,795 ✭✭✭


    Hi,
    I am just curious, but if I wanted to do a popup window for a link, say a terms etc page, and I want to use the _blank tag for a new window, can I designate the size of that window to autofit the contents, instead of a whole window opening up for only a few lines of text? Can't find it in Dreamweaver

    Seanie.


Comments

  • Registered Users, Registered Users 2 Posts: 597 ✭✭✭yeraulone




  • Registered Users, Registered Users 2 Posts: 21,271 ✭✭✭✭Eoin


    AFAIK, you can't specify the size of a target window using HTML - only JavaScript (check out the tutorial that Seanie M posted).

    However, what you can do is specify the dimensions of the new page in the new page itself (as opposed to the page linking to it). Put the following code in between your <HEAD> tags.
    <script type="text/JavaScript">
    	window.resizeTo(400,500);
    </script> 
    

    Eoin
    <EDIT> - sorry, the link that yeraulone posted!


  • Registered Users, Registered Users 2 Posts: 1,795 ✭✭✭Seanie M


    Thanks for the link yeraulone.

    And Eoin, your piece of code will be just as effective. That sounds like the one I want.

    Cheers guys!

    Seanie.


Advertisement