Warning is not the best option for debugging purposes. Consider using some specially designed tools, such as FireBug in Firefox, and developer tools in WebKit browsers. Then use the console.log method to see some of the data you need in a highly readable format.
attrib = document.getElementById("attrib-2"); console.log(attrib.selectedIndex);
source share