Results 1 to 9 of 9

Thread: Maximizing Window

  1. #1
    Join Date
    Oct 2008
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Maximizing Window

    1) Script Title:
    DHTML Window widget (v1.1)
    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...ndow/index.htm
    3) Describe problem:
    There is no built in facility for maximizing the Window (If maximized it should span all over its container).
    What changes I have to make to provide maximize facility ?

    Regards,
    Sachin.
    Last edited by ddadmin; 10-17-2008 at 05:11 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    This is probably something I'll be adding to the script the next time it's updated. In the meantime, are you talking about adding a "maximize" icon to every DHTML window, or just come up with a function that can be run where you want (ie: a link) to maximize the window? The later is simpler.
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    Sachin20082008 (10-16-2008)

  4. #3
    Join Date
    Oct 2008
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default @ddadmin

    Actually i am thinking of adding a "maximize" icon to every DHTML window.
    But can u tell me how should I maximize the window using link?
    Also how should I open the window already maximized ?

    Thanks,
    Sachin

  5. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Regarding maximizing a DHTML window via a link, assuming you have the below window instance that opens automatically:

    Code:
    <script type="text/javascript">
    
    var googlewin=dhtmlwindow.open("googlebox", "iframe", "http://www.google.com", "#1: Google Web site", "width=590px,height=350px,resize=1,scrolling=1,center=1", "recal")
    
    </script>
    A generic function that maximizes the above may look like this:

    Code:
    function maximizewin(winvar){
    	winvar.moveTo(dhtmlwindow.scroll_left, dhtmlwindow.scroll_top)
    	winvar.setSize(dhtmlwindow.docwidth-10, dhtmlwindow.docheight)
    }
    For example:

    Code:
    <a href="javascript:maximizewin(googlewin)">Maximize DHTML window</a>
    In other words, the key is to call dhtmlwindow.moveTo() and dhtmlwindow.setSize().
    DD Admin

  6. #5
    Join Date
    Oct 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Maximize Icon on every DHTML Window

    Hi, actually I am using the Window widget to open external links on a links page. I would like the maximize function on every window (no link). I have been able to add to maximize image to the windows, but I don't know enough about javascript to add the functionality. Can someone please help? Usual tight deadline. Thanks in advance! Di

  7. #6
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hi wcsadmin:
    Try the below modified dhtmlwindow.js if you wish every DHTML window to be maximized (covering the entire visible page).
    DD Admin

  8. #7
    Join Date
    Oct 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks! I'll give it a try and post back tomorrow.

  9. #8
    Join Date
    Sep 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hmm ... I think I didn't clearly communicate what I was trying to do. The link is preloaded in a particular window size. I reprogrammed dhtmlwindows.js so the MIN, MAX, and CLOSE buttons are now at the top of the window. I wanted to add the maximize functionality to the MAX button. When the window is MAXIMIZED, the RESIZE icon should appear in its place. When the RESIZE button is clicked, the window would return to its original size. Just like a regular window.

  10. #9
    Join Date
    May 2010
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Attachment 3306

    Although this blog is a little old I recently came across the need for this script and wanted it to maximize as well. I updated the .js file to accomodate the ability to maximize. Unfortunately the script was written to replace the min, max, restore icons respectively.

    To elaborate: when you click Minimize, the minimized window now will replace the min with restore. The max icon shows but is not functional (close still works). When you click Maximize, the maximized window will replace the max with restore. The min icon shows but is not functional.

    I'm muddling through the script to try and achieve functionality within any state. Hopefully this benefits someone other than just me...

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
  •