Results 1 to 8 of 8

Thread: DHTML Window widget - mod

  1. #1
    Join Date
    May 2007
    Location
    Sherman Texas
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DHTML Window widget - mod

    1) Script Title: DHTML Window widget (v1.03)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ndow/index.htm

    3) Describe problem: Not a problem. This script works bueatifully. Many cheers and profound appreciation.
    What I have is a function that creates/shows the ajax / iframe windows. I don't need the smaller minimumized box to expand the window. Is there any way to get rid of it?

    Thanks a bunch!

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

    Default

    Do you mean you simply wish to get rid of the "minimize" icon within the window interface? You can do this easily, though the changes would be applied to all DHTML windows. Inside the .js file, just edit the below:
    Code:
    domwindowdata+='DHTML Window <div class="drag-controls"><img src="'+this.imagefiles[0]+'" title="Minimize" style="display:none" /><img src="'+this.imagefiles[1]+'" title="Close" /></div>'
    The part in red is new.

  3. #3
    Join Date
    May 2007
    Location
    Sherman Texas
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Almost but not quite.
    Not sure if I'm right - but I think the minimize icon is a toggle.
    Hiding the main window and displaying the small one.
    I still need the icon to hide the main window.
    I just don't need the small one displayed.

  4. #4
    Join Date
    May 2007
    Location
    Sherman Texas
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I can see now that it is more complex than that.
    I've gone through all of the style.display="block" s without finding it.
    And if none of them do it - then my toggleing routine won't work either. <sigh>
    yes it will - all it does is call show();
    Last edited by StarrRider; 06-28-2007 at 11:39 AM.

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

    Default

    Hiding the main window and displaying the small one.
    I still need the icon to hide the main window.
    I just don't need the small one displayed.
    Hmmm I'm confused on what you're trying to do then. The "close" icon is what toggles the hiding/showing of the window, and remains untouched. What's gone with the above change is the "minimize/restore" icon.

    Can you elaborate on what you're trying to remove from the interface?

  6. #6
    Join Date
    May 2007
    Location
    Sherman Texas
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK - sorry for the delay
    I'm not quite a nob but you do some things I haven't learned yet - so Please correct me if I am wrong. - As I see it
    the variables assignment creates/opens the widget
    the Min button expands/contracts the div between it's 2 sizes
    The Close buttons call the close function which trys the onclose function.
    --- This is what I'm trying to do ---
    I'm using a function that looks to see if the variable is null & either assigns it or calls varName.show(). It also stores a cookie so varName is reload it if the page is refreshed. - working
    A custom onclose function deletes that cookie. - working
    --- My problem is ---
    The Minimize button is a toggle that hides the inner div / changes the Min button & repositions of the widget. All I need it to do is hide the widget
    --- This seems to work ---
    I commented out everything in
    Code:
    minimize:function(button, t){
    and added
    Code:
    t.style.display="none"
    which seems to be working. The only reason I said seems - is that when it's restored - the widget returns to the original position.

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

    Default

    So basically you just want the minimize icon to do the exact same thing as the close icon, but without executing any custom function? If so, you're basically there. Replace everything inside function minimize() with the following:

    Code:
    dhtmlwindow.rememberattrs(t) //remember window's dimensions/position on the page before closing
    t.style.display="none"

  8. #8
    Join Date
    May 2007
    Location
    Sherman Texas
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank You

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
  •