Forum Moderators: open

Message Too Old, No Replies

IE is blocking my onMouseOver flyout

         

smithaa02

3:38 pm on Aug 5, 2008 (gmt 0)

10+ Year Member



I want to create a flyout menu system like on target.com, and I was going to do this by using onmouseover (on the link) to create the flyout and onMouseOut (on the iframe)to close it.

This works perfectly in Firefox and will work in IE, but I have to check the popup warning that appears which won't work for my clients:

"To protect your security, Internet Explorer has restricted this website from running scripts or ActiveX controls that could access your computer. Click here for option"

Any ideas on what I can do?

Here is my code if anybody wants to check it out:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
a.nav {
display:block;
margin-left:20px;
width:100px;
height:50px;
float:left;
background-color:red;
color:white;
}
a.nav:hover {
color:yellow;
}
#navcontainer {
position:absolute;
left:0px;
background-color:lightgreen;
border:1px solid black;
}
.dd {
visibility:hidden;
}
</style>
<script language="JavaScript" type="text/javascript">
<!--

function showdiv(varname) {
var a = document.getElementById(varname);
a.style.visibility = 'visible';
with (a.style)
{
position = 'absolute';
border = 'none';
}

with (a.style)
{
visibility = 'visible';
}

}
function hidediv(varname) {
var a = document.getElementById(varname);
a.style.visibility = "hidden";
}
-->
</script>
</head>

<body style='background-color:lightblue;'>
<div id='navcontainer'>
<a class='nav' href='#' onMouseOver="showdiv('l2dd_giftcard');" >Option</a>
<a class='nav' href='#'>Option</a>
<a class='nav' href='#'>Option</a>
<a class='nav' href='#'>Option</a>
<a class='nav' href='#'>Option</a>
<a class='nav' href='#'>Option</a>
</div>
<iframe src='l2dd_giftcard.htm' id="l2dd_giftcard" class="dd" onMouseOut="hidediv('l2dd_giftcard');">
</iframe>
</body>

</html>

rocknbil

5:06 pm on Aug 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you try uploading it to your server and testing from there? IE always does this with local files.

smithaa02

7:47 pm on Aug 5, 2008 (gmt 0)

10+ Year Member



That appeared to do the trick!