Vivid Lust Posted February 17, 2009 Share Posted February 17, 2009 Hi all, How could I execute the following function on page load? Thanks minimize:function(button, t){ dhtmlwindow.rememberattrs(t) button.setAttribute("src", dhtmlwindow.imagefiles[2]) button.setAttribute("title", "Restore") t.state="minimized" //indicate the state of the window as being "minimized" t.contentarea.style.display="none" t.statusarea.style.display="none" if (typeof t.minimizeorder=="undefined"){ //stack order of minmized window on screen relative to any other minimized windows dhtmlwindow.minimizeorder++ //increment order t.minimizeorder=dhtmlwindow.minimizeorder } t.style.left="10px" //left coord of minmized window t.style.width="300px" var windowspacing=t.minimizeorder*10 //spacing (gap) between each minmized window(s) t.style.top=dhtmlwindow.scroll_top+dhtmlwindow.docheight-(t.handle.offsetHeight*t.minimizeorder)-windowspacing+"px" }, ... ... ... document.write('<div id="dhtmlwindowholder"><span style="display:none">.</span></div>') //container that holds all dhtml window divs on page window.onunload=dhtmlwindow.cleanup Quote Link to comment Share on other sites More sharing options...
rhodesa Posted February 17, 2009 Share Posted February 17, 2009 you can do this: <body onload="functionName();"> or <script type="text/javascript"> window.onload = function () { functionName(); } </script> where functionName is the name of your function. i was going to put minimize() in there, but it looks like it's inside an object, in which you would need to use: objectName.functionName() Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.