I am using this JS script for multiple country selection and I get an error from firebug.
selObj is null
[Break on this error] selObj.options[0] = new Option('Select Country','');
The relevant code is this:
function populateCountry(idName) {
var countryLineArray = country.split('|'); // Split into lines
var selObj = document.getElementById(idName);
selObj.options[0] = new Option('Select Country','');
selObj.selectedIndex = 0;
for (var loop = 0; loop < countryLineArray.length; loop++) {
lineArray = countryLineArray[loop].split(':');
countryCode = TrimString(lineArray[0]);
The full script can be found here.
This is how I use it in my HTML:
<select id="billCountrySelect" onchange="updateState('billCountrySelect')" name="bill_country">
What is the problem. I am passing it correct parameters??