Recently, I have had an opportunity to make use of the innerHTML element of a DIV. While I admit no knowledge before a couple (that’s two) days ago, it has become a quick friend. Why? Simple, it really speeds large pages downloads. In my case, anywhere from a few to a few hundred rows in a table. Each with their own variable number of dropdowns. Each one taking time to speed across the Internet to your browser.

How does it work? It’s very simple. Here is an example:

function addContent() {
document.getElementById(myelement).innerHTML=’Something Else’;
}

Just call this from your element of interest via a javascript event (I used the onClick of my link tag), and you are on your way. It might look like this:

<div id=”test”><a href=”javascript:void(0); ” onClick=”addContent();”>Click here</a></div>

Just like that, you can change the content of your DIV. In this case, the text is minimal. But, imagine you have hundreds of dropdowns, each with several options. Now, you have gone from a little text on each one to much more data to transmit.

In my ad hoc testing, the speed difference can easily be seen. It was well worth the effort. I am certain our members will be pleased.