PDA

View Full Version : Regarding "Dynamic Ajax Content" Demo



renphi
08-01-2008, 03:14 PM
The demo located HERE (http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm#combo) shows how to dynamically display content on demand. My question is how would I go about building on that so that I could expand/collapse the content contained in the DIV?

Thanks.

renphi
08-01-2008, 09:40 PM
Solved by adding the following after the "page_request.send(null)" line:



var dv = document.getElementById(containerId);
dv.style.display = (dv.style.display == 'block'? 'none':'block');