I wasn't entirely sure where to put this but I figured html was general enough a place. I have an error in my code that I can't figure out. It works fine in firefox but it does not work in IE. I have copied all the related code below. The main objective of the code is to make a drop down menu choice change a picture elsewhere on the page.
Error reads
"Line 380
Object doesn't support this property or method"
Line 380 is the bracket "{" after the line "function imgswap()"
<script type="text/javascript">
/************************************************************
* Script by : Raymond Angana
* Title: Dropdown Based Picture w/ Captions
* First seen in AFHB2000.com
* rangana in AHFB2000.com
* Created June 5, 2008
* This notice must stay intact
/**********************************************************/
function imgswap()
{
bp=('http://xxxxx.xxx/'), //base url of your images
imgnum=2, //Number of your images. This should match on your comboboxes options.
thumb=document.getElementById('thumb'), //id of your image that will be changing
combobox=document.getElementById('selection'); // id of your combobox.
combobox.onchange=function()
{
thumb.src=bp+'picture'+this.value+'.jpg';
description.innerHTML=caption[this.value];
}
}
</script>



Reply With Quote




Bookmarks