Object: hsVariables
Functions
EventsObject: hs.ExpanderVariablesFunctionsEvents
|
hs.onActivateFires after the hs.container has been generated
void hs.onActivate()
The hs.container is a The hs.container is generated either on page load if any preloading is done, or when the first thumbnail is clicked. Appending it to the body of the document leads to problems in some cases, especially on ASP.NET pages if you are using input fields in the Highslide popup. In this case the input fields are moved out of the page form. See the example below for how to move them back into the form. Hooking into the hs.onActivate event is a good idea when the entire container should be moved in the DOM tree or repositioned using CSS. A reference to the "Loading" label, hs.loading, is also available when this event has fired. Details
ExampleMoving the hs.containerIn this example we have a single pagewide form, typical for ASP.NET pages, and we want to move the hs.container into the page form to assure the input fields in our HTML expanders are part of the postback. Put this in your head section after highslide.js is included: <script type="text/javascript"> hs.onActivate = function() { var theForm = document.forms[0]; if (theForm) theForm.appendChild(hs.container); } </script> |