All pastes #2103747 Raw Edit

Untitled

public javascript v1 · immutable
#2103747 ·published 2012-01-18 10:13 UTC
rendered paste body
function validateForm() {		suburbListBox = document.getElementById('servicesuburbdropdown');		var count = 0;		var selectedArray = new Array();		for (i=0; i<suburbListBox.options.length; i++) {			if (suburbListBox.options[i].selected) {				selectedArray[count] = suburbListBox.options[i].value;				count++;			}		}				if(count == 0) {			showDiv(document.getElementById('mBox'));				document.getElementById('mBoxContents').innerHTML = '<p><img src="images/cross.gif" align="right" hspace="5" vspace="5" border="0" />There must be at least one service suburb selected from the list of available suburbs.</p>';				return false;		}		return true;	}