Results 1 to 7 of 7

Thread: Minimize Function [Required]

  1. #1
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Minimize Function [Required]

    1) Script Title: DHTML Window

    2) Script URL (on DD):http://dynamicdrive.com/dynamicindex8/dhtmlwindow.htm

    3) Describe problem: None, just need an additional function

    Hi
    In the above mentioned script there is a maxmize / restore function used as follows:

    Code:
    function maximize(){
    if (minrestore==0){
    minrestore=1 //maximize window
    document.getElementById("maxname").setAttribute("src","restore.gif")
    document.getElementById("dwindow").style.width=ns6? window.innerWidth-20+"px" : iecompattest().clientWidth+"px"
    document.getElementById("dwindow").style.height=ns6? window.innerHeight-20+"px" : iecompattest().clientHeight+"px"
    }
    else{
    minrestore=0 //restore window
    document.getElementById("maxname").setAttribute("src","max.gif")
    document.getElementById("dwindow").style.width=initialwidth
    document.getElementById("dwindow").style.height=initialheight
    }
    document.getElementById("dwindow").style.left=ns6? window.pageXOffset+"px" : iecompattest().scrollLeft+"px"
    document.getElementById("dwindow").style.top=ns6? window.pageYOffset+"px" : iecompattest().scrollTop+"px"
    }
    I wanted to ask is there a way to have a "minimize / restore" function?

    So that only the title bar of the window shows upon minimization?

    Any help appretiated,
    Thanks,
    Aku

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    You need more than just a function, you need the markup and images to go with it. Also, although this script is rated for Opera 7+, the drag feature doesn't work in that browser and though improved from the original version of this script is a bit unreliable in all browsers. I've fixed that it doesn't drag in Opera, and added the functionality you requested here:

    http://home.comcast.net/~jscheuer1/side/dhtmlwin.htm

    The entire script could use a rewrite though.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    WOW! Thanks so much!

    Thank you Thank you Thank you Thank you

    Aku

  4. #4
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Oh 1 more thing I would like to ask is - is there a way for the browser to remember if the person minimized this window or closed it or maximized it?

    So that if the same user returns they get the same preference of viewing they had specified?

    I know cookies would be involved, but dont know much and certainly willing to learn. Could you point me in the right direction? And ill do the research from there

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    As I said, the script needed a rewrite so I did that and added the cookie. I'm not sure exactly how you envisioned this working but, this version will remember what was displayed (as far as the state of the DHTML window goes) and reload the page like that. There could be some bugs yet to work out:

    http://home.comcast.net/~jscheuer1/side/dhtmlwin_s.htm

    Notes: The dragging operation is now much smoother and you cannot drag beyond the borders of the browser window. Also, selecting of text as occurred when dragging in some browsers has been eliminated.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The thing I am trying to achieve is basically slightly different from the above script

    In the above a window is called inside an Iframe

    however I am calling content directly into DIV's

    have a look at my DIV's on this page http://goofy-goobers.com/forum

    its a test site I use for experimentation - but notice that the forum functions along with many other things are being called into the DIV

    My end objective is to be able to develop a script which will allow board users to display a multitude of content such as:

    - PM popups replaced by popup DIVS

    - Adverts in DIVs

    - Shoutboxes, etc in DIV's

    so it would give people a lot of flexibility especially since they can put more things on their pages with less of a clutter

    another example of my live site: http://path-to-peace.net/forum here I am using a DIV tag to display the "users online" plus a nav bar

    I'll keep working on this - thanks for all your time and help

    I hope in the end I can figure it out to work with DIV's as well
    Aku

  7. #7
    Join Date
    Oct 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi, thank you to Akulion for referring me here.

    I have 2 questions and I would really appreciate any help.
    I copy/pasted the Comcast code, and tried it out.
    1) How do I make multiple boxes instead of just 1? I'm confused because there is already a dwindow and dwindow1
    2) At the comcast site, when a viewer closes the box, and then presses refresh,the box comes back, so the box comes up automatically. But for some reason, when I replaced the url of google with the url of one of my own pages, this didn't happen. Instead, the only way to get back the box was to click the link. How do I get the box to automatically come up upon refresh?

    Thanks so much for any help

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
  •