Code is as follows:
document.write( '<FORM name="horseform ">');
document.write( ' <SELECT SIZE="1" NAME="horsebran dslist" STYLE="font-size:
8pt">');
document.write( ' <OPTION VALUE="http://my.domain.com/cat1.html">Cate gory
1</OPTION>');
document.write( ' <OPTION VALUE="http://my.domain.com/cat2.html">Cate gory
2</OPTION>');
document.write( ' <OPTION VALUE="http://my.domain.com/cat3.html">Cate gory
3</OPTION>');
document.write( ' </SELECT>');
document.write( ' <a href="javascrip t:;" title="Click here"
onclick="goto_P etCategoryURL(d ocument.horsefo rm.elements.hor sebrandslist)"> <img
border="0" src="../images/horse/someimage.gif" width="29" height="20"
alt="Click here" align="absbotto m"></a>');
document.write( '</FORM>');
In a separate .js file, the function "goto_PetCatego ryURL" looks like this:
function goto_PetCategor yURL(object) {
if (object.selecte dIndex > 0) {
window.location .href = object.options[object.selected Index].value;
}
return;
}
In Netscape (I use version 7), all works OK. In IE or Opera, when I click
the image, nothing happens. No error shows in the Opera JavaScript Console
or the bottom left of IE.
Who can solve this mystery?
Thanks,
Don