P
Phper
I wrote a block of Javascript code, it works fine in Firefox. But it
doesn't work in Internet Explorer.
function SelectDistrict(argument)
{ if(argument==undefined)
{}
else
{
var _myhtml ="<option value=\"\">select a locationon</option>";
var tempInt = parseInt(argument);
$('#inputcity').hide();
var i=1;
while(i<=51)
{
tempInt=tempInt+100;
if(county[tempInt]==undefined)
{
_myhtml+="<option value=99>All</option>";
var selectCity = document.getElementById('city');
selectCity.style.display = '';
selectCity.innerHTML = _myhtml;
break;
}
else {
_myhtml+="<option value=\""+tempInt+"\">"+county[tempInt]+"</
option>";
i++;
}
}
}
}
How can I make it work both in Firefox and Internet Explorer?
doesn't work in Internet Explorer.
function SelectDistrict(argument)
{ if(argument==undefined)
{}
else
{
var _myhtml ="<option value=\"\">select a locationon</option>";
var tempInt = parseInt(argument);
$('#inputcity').hide();
var i=1;
while(i<=51)
{
tempInt=tempInt+100;
if(county[tempInt]==undefined)
{
_myhtml+="<option value=99>All</option>";
var selectCity = document.getElementById('city');
selectCity.style.display = '';
selectCity.innerHTML = _myhtml;
break;
}
else {
_myhtml+="<option value=\""+tempInt+"\">"+county[tempInt]+"</
option>";
i++;
}
}
}
}
How can I make it work both in Firefox and Internet Explorer?