Dropdown not working in IE - good in Firefox
Hi all...
I hope someone can help.
We have a quote ajax/jquery form that works in Firefox (the dropdown values can be seen), but doesn't work in Internet Explorer.
See -
http://www.villagevetinsurance.co.uk/quote_engine/
The problem is with step 2 of the process.
On step 1 - just put in a post code (i.e. sw7 2rl)... then click 'Go to step 2'.
On step 2 - click the 'Cat' or 'Dog' radio buttons.
In Firefox choosing between the 2 radio buttons, changes the 'Pet breed' - either cat breeds or dog breeds populates the dropdown (which come from a MySQL database).
below is the code that I think is causing the problem:
-
function pet_type_change_handler()
{
for (var j = 0; j < numberOfPets; j++)
if ( $("#tab" + j).css("display") == "block" )
{
$("#selBreed" + j).attr("options").length = 0;
// add "please select" option...
$("<option/>").attr("value","").attr("text"," - please select").appendTo("#selBreed" + j);
if ($("#rdPetTypeCat" + j).attr("checked") == true)
{
// dealing with cats...
for ( var i=0; i<__cats.length; i++ )
$("<option/>").attr("value",__cats[i].id).attr("text",__cats[i].name).appendTo("#selBreed" + j);
}
else if ($("#rdPetTypeDog" + j).attr("checked") == true)
{
// dealing with dogs...
for ( var i=0; i<__dogs.length; i++ )
$("<option/>").attr("value",__dogs[i].id).attr("text",__dogs[i].name).appendTo("#selBreed" + j);
}
}
}
I have uploaded some of the files if it helps here:
http://www.fastnethosts.co.uk/files.zip
Any advice or even a solution would be very much appreciated.
thanks
Fastnet