Results 1 to 8 of 8

Thread: setting the default drop down panel to open

  1. #1
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default setting the default drop down panel to open

    1) Script Title: make a default on drop down panel

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

    3) Describe problem:
    how to make a drop down panel default open?


    thx in advanced....
    _____________________

    David Demetrius // davejob
    _____________________

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

  3. #3
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    nothing change ddadmin, i already replace the dddropdownpanel.js with this one
    http://www.dynamicdrive.com/forums/a...0&d=1269987424

    you add this code right:
    Code:
    stateconfig: {initial: "5px", persiststate: true, initialstate:"open"}, // initial: initial reveal amount in pixels (ie: 5px)
    but nothing happen, every time i open or refresh the page the panel close.

    thx for your attention...
    _____________________

    David Demetrius // davejob
    _____________________

  4. #4
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    is there any solution for my problem here,

    i already try to edit this part:

    Code:
    setting.dir="up" //initial state of panel (up="contracted")
    	if (setting.stateconfig.persiststate && ddpanel.getCookie(setting.ids[0])=="down"){
    		setting.dir="down"
    	}
    into

    Code:
    setting.dir="down" //initial state of panel (up="contracted")
    	if (setting.stateconfig.persiststate && ddpanel.getCookie(setting.ids[0])=="down"){
    		setting.dir="down"
    	}
    it's work, every time i refresh or open the page the drop down panel always open.

    the problem is, the drop down panel always open even i already close it on the first page.

    the original drop down default is close, so when we open or close it that command is carried to the other page, but now it broke.

    Note: i use the dropdown panel on all of my page.

    thx...
    _____________________

    David Demetrius // davejob
    _____________________

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

    Default

    Do you have persistence enabled that may interfere with the initial state of the panel? Please post a link to the page on your site that contains the problematic script so we can check it out.
    DD Admin

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

    davelf (04-12-2010)

  7. #6
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default sorry for my late response

    this is the link to my problem page:

    http://imaxxo.net/smiling/

    and this is the JS that i already customize:

    Code:
    setting.dir="down" //initial state of panel (up="contracted")
    	if (setting.stateconfig.persiststate && ddpanel.getCookie(setting.ids[0])=="down"){
    		setting.dir="down"
    	}
    Code:
    var defaultpanel=new ddpanel({
    	ids: ["mypanel", "mypanelcontent", "mypaneltab"], // id of main panel DIV, content DIV, and tab DIV
    	stateconfig: {initial: "0px", persiststate: true, initialstate:"open"}, // initial: initial reveal amount in pixels (ie: 5px)
    	animate: {enabled: true, steps: 5}, //steps: number of animation steps. Int between 1-20. Smaller=faster.
    	pointerimage: {enabled: true, src: ["img/down.jpg", "img/up.jpg"]},
    	closepanelonclick: {enabled: true} // close panel when links or elements with CSS class="closepanel" within container is clicked on?
    })
    thank you very much ddadmin
    Last edited by davelf; 04-12-2010 at 02:51 AM.
    _____________________

    David Demetrius // davejob
    _____________________

  8. #7
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    is there any other solution for this problem?
    _____________________

    David Demetrius // davejob
    _____________________

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

    Default

    Hmm your page doesn't load for me unfortunately, at the moment at least.
    DD Admin

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
  •