Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Internet & the Web (https://www.askmehelpdesk.com/forumdisplay.php?f=177)
-   -   Javascript query (https://www.askmehelpdesk.com/showthread.php?t=4448)

  • Jul 6, 2004, 06:19 PM
    Darth_Tanion
    Javascript query
    I have a website I have created and some of the links open in new windows. This is simple enough to do. I have used the code:
    <a href="wherever.html" target="new.window"> but the problem is that I have no control over the size of the window. I would like them to come up in a small window that cannot be resized or maximised.
  • Jul 21, 2004, 10:55 AM
    tadds
    Re: Javascript query
    Create a JavaScript function
    [pre]
    <script language="JavaScript1.2">
    <!-- Script Begin
    function NewWindow() {
    window.open("sample.html","title","toolbar=0,locat ion=0,directories=0,menuBar=0,scrollbars=0,resizab le=0,
    width=320,height=120,left=100,top=100");
    }
    // Script End -->
    </script>

    [/pre]

    Then just call the NewWindow() routine when you want a formatted window. Play with the options until you get it correct.
  • Jul 21, 2004, 03:51 PM
    Darth_Tanion
    Javascript query
    Awesome. Thanks.

  • All times are GMT -7. The time now is 09:24 PM.