1352 Part V . Putting JavaScript to Work (Web design course)
January 17th, 20081352 Part V . Putting JavaScript to Work swapState(). Then, based on the new setting, the display property of the block is set accordingly, and widget art is changed through two special-purpose functions. // toggle an outline mother entry, storing new state value; // invoked by onClick event handlers of widget image elements function toggle(img, blockNum) { var newString = var expanded, n // modify state string based on parameters passed IMG expanded = currState.charAt(blockNum) currState = swapState(currState, expanded, blockNum) // dynamically change display style if (expanded == 0 ) { document.getElementById( OLBlock + blockNum).style.display = block img.src = getExpandedWidgetState(img.src) } else { document.getElementById( OLBlock + blockNum).style.display = none img.src = getCollapsedWidgetState(img.src) } }
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.