I have a long form that hides and displays sections at a time using script. The scriptcode that makes this happen is shown below. Since the upgrade, the entire form shows, so apparently window.onload isn't working. Is there another way to hide all sections except the first one when the form first loads?
Thanks.
// collapse individual elements
function collapseElem(obj)
{
var el = document.getElementById(obj);
el.style.display = 'none';
}
// expand next element
function expandElem(obj)
{
var el = document.getElementById(obj);
el.style.display = '';
}
// collapse all elements, except the first one
function collapseAll()
{
// change the following line to reflect the number of pages
var numFormPages = 21;
for(i=9; i <= numFormPages; i++)
{
currPageId = ('mainForm_' + i);
collapseElem(currPageId);
}
}
// run the collapseAll function on page load
window.onload = collapseAll;
Thanks.
// collapse individual elements
function collapseElem(obj)
{
var el = document.getElementById(obj);
el.style.display = 'none';
}
// expand next element
function expandElem(obj)
{
var el = document.getElementById(obj);
el.style.display = '';
}
// collapse all elements, except the first one
function collapseAll()
{
// change the following line to reflect the number of pages
var numFormPages = 21;
for(i=9; i <= numFormPages; i++)
{
currPageId = ('mainForm_' + i);
collapseElem(currPageId);
}
}
// run the collapseAll function on page load
window.onload = collapseAll;