What's your panel instance? You need that. For example to toggle a panel you created with:
Code:
<script type="text/javascript">
var testpanel=new ddpanel({
ids: ["mypanel2", "mypanelcontent2", "mypaneltab2"], // id of main panel DIV, content DIV, and tab DIV
stateconfig: {initial: "5px", persiststate: true}, // 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: ["arrow-down.gif", "arrow-up.gif"]},
closepanelonclick: {enabled: true} // close panel when links or elements with CSS class="closepanel" within container is clicked on?
})
</script>
You would do:
Code:
<body onload="testpanel.togglepanelplus('down');">
But since the panel also initializes onload, you probably need a timeout:
Code:
<body onload="setTimeout(function(){testpanel.togglepanelplus('down');}, 300);">
The browser cache may need to be cleared and/or the page refreshed to see changes.
If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
Bookmarks