Why doesnt IE like this javascript?

Associate
Joined
6 Feb 2003
Posts
1,105
Location
London
location is on www.djtempest.co.uk

basically when you move your mouse over the buttons a small text description comes up underneath. It works fine in Firefox.

Code:
// Change Description
function changeDesc(desc){
	document.getElementById('description').innerHTML = desc;
}

// Change The Webpage
function navigation(url){
	frames['content'].location.href=url;
}

....

<img src="images/table_right_buttons_5.gif" alt="Dates" width="61" height="28" border="0" onClick="navigation('dates.php')"  onMouseOver="changeDesc('Dates')"></a>

Also just as a matter of interest what is it about the site thats making IE display its stupid security warning about active content? Is it the scripts im using or just the fact it has an iFrame? And is there a way around it?
 
ok update on this ive now got the divs set up with the descriptions and the following function which will show them when they put their mouse over the buttons

Code:
function toggleLayer(whichLayer){

if (document.getElementById){
	// this is the way the standards work
	var style2 = document.getElementById(whichLayer).style;
	style2.display = style2.display? "":"block";
	}
else if (document.all){
	// this is the way old msie versions work
	var style2 = document.all[whichLayer].style;
	style2.display = style2.display? "":"block";
}
else if (document.layers){
	// this is the way nn4 works
	var style2 = document.layers[whichLayer].style;
	style2.display = style2.display? "":"block";
	}
}

</script>

....

div#news
{
margin: 0px 20px 0px 20px;
display: none;
}
div#media
{
margin: 0px 20px 0px 20px;
display: none;
}
div#bio
{
margin: 0px 20px 0px 20px;
display: none;
}
div#dates
{
margin: 0px 20px 0px 20px;
display: none;
}
div#contact
{
margin: 0px 20px 0px 20px;
display: none;
}

What i need to know is how to hide the current div thats showing before showing the next because currently its just showing them all one by one. see www.djtempest.co.uk for example of what i mean..
 
Back
Top Bottom