Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

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,278 ✭✭✭✭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