I'm going to have to think about why this is a problem in IE but, it probably has to do with the undeclared variable 'item' being interpreted as an object via the implied document.all prefix. In other words, without declaring the variable, IE (probably) sees this line:
Code:
item=document.getElementById(id);
as:
Code:
document.all.item=document.getElementById(id);
Assuming a piece of a script to be a variable without declaring it is bad form anyway and since, this fixes it:
Code:
var item=document.getElementById(id);
I'd go with good form here. That is all that is required to get this code to work in IE. While we are at it, it is also good form to add 'return false;' to the onclick events of anchor tags when the href attribute is set and the action of loading it is not required. So, these two lines would benefit from this:
Code:
<a href="#" class="show_link" onClick="show_search_area();return false;" id="search_area_open_url" >Open</a>
<a href="#" class="noshow_link" onClick="hide_search_area();return false;" id="search_area_close_url" >Close</a>
Bookmarks