Css/JavaScript problem
Neutrino
03-20-2005, 04:23 AM
Well its not really a problem more of a I hate internet explorer problem. Anyway i was thinking of adding some drop down menus on this new site I'm building so I created a little separate html file to experiment with different options. Anyway all is peachy on firefox till i try explorer (the secure sp2 version) and find out that it blocks the script for security reasons.
I presume its blocking the little javascript I'm using, i don't think its the css code that its blocking. But knowing microsoft you never know.
Well now its true people can click on the bar at the top and alow scripts but I don't want to scare them away from my site thinking I'm running dangerous scripts. So its there a way i can make IE happy and run the code without the panic allert:
Here is the code for the main page:(I know its incomplete as I said it is just a little page to mess with)
<HTML>
<TITLE>Pull-Down Menus</TITLE>
<HEAD><LINK href="style4.css" type="text/css" rel="stylesheet">
<STYLE TYPE="text/css">
#menu1 { display : none }
#menu2 { display : none }
#menu3 { display : none }
a:link {color:black; text-decoration:none}
a:hover {color:blue; text-decoration:underline}
</STYLE>
</HEAD>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<TABLE BORDER="0" class="menu_1">
<TR>
<TD VALIGN="top" WIDTH="200">
<SPAN onMouseOver="document.all.menu1.style.display = 'block'" onClick="document.all.menu1.style.display = 'none'"><div id="myMenu2"><a href="#">
<FONT SIZE="-1"><b> Poo Menu 1</b></FONT><BR></a></div></SPAN>
<SPAN ID="menu1" onClick="document.all.menu1.style.display = 'none'">
<div id="myMenu">
<a href="page2.html">Page2</a>
<a href="/tutorials/buttons/">Poo1</a>
<a href="/tutorials/buttons/">Poo2</a>
<a href="/tutorials/buttons/">Poo3</a>
<a href="/tutorials/buttons/">[-] Click to close</a>
</div>
</SPAN>
</TD>
</tr>
</table>
</body>
</html>
and here is the CSS code linked to it:
.menu_1{
position:absolute;
left:600px;
top:70px;
}
#myMenu {
width: 100%;
background-color:#ffffff;
}
#myMenu span {
display: none;
visibility: hidden;
}
#myMenu a {
display: block;
padding-right: 0.4em;
padding-left: 0.5em;
padding-top: 0.2em;
padding-bottom: 0.2em;
text-decoration: none;
}
#myMenu a:link {
background-color:#CCCCCC ;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
COLOR: #000000; TEXT-DECORATION: none; Font-Size:10px; font-weight:normal;
border-top: solid #ffffff 1px;
}
#myMenu a:visited {
background-color: #CCCCCC;
color: black;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
COLOR: #000000; TEXT-DECORATION: none; Font-Size:10px;
border-top: solid #ffffff 1px;
}
#myMenu a:hover {
background-color: #54A4DE;
color: white;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION: none; Font-Size:10px; font-weight:bold;
border-top: solid #ffffff 1px;
}
#myMenu a:active {
background-color: ##CCCCCC;
color: white;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
COLOR: #000000; TEXT-DECORATION: none; Font-Size:10px;
border-top: solid #ffffff 1px;
}
/*---navigation control Secondary---*/
#myMenu2 {
width: 100%;
background-color:#ffffff;
}
#myMenu2 span {
display: none;
visibility: hidden;
}
#myMenu2 a {
display: block;
padding-right: 0.4em;
padding-left: 0.5em;
padding-top: 0.2em;
padding-bottom: 0.2em;
text-decoration: none;
}
#myMenu2 a:link {
background-color:#CCCCCC ;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
COLOR: #000000; TEXT-DECORATION: none; Font-Size:10px; font-weight:normal;
border-top: solid #ffffff 1px;
}
#myMenu2 a:visited {
background-color: #CCCCCC;
color: black;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
COLOR: #000000; TEXT-DECORATION: none; Font-Size:10px;
border-top: solid #ffffff 1px;
}
#myMenu2 a:hover {
background-color: #FB0E0E;
color: white;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION: none; Font-Size:10px; font-weight:bold;
border-top: solid #ffffff 1px;
}
#myMenu2 a:active {
background-color: ##CCCCCC;
color: white;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
COLOR: #000000; TEXT-DECORATION: none; Font-Size:10px;
border-top: solid #ffffff 1px;
}
Thanks in advance for your help :)
I presume its blocking the little javascript I'm using, i don't think its the css code that its blocking. But knowing microsoft you never know.
Well now its true people can click on the bar at the top and alow scripts but I don't want to scare them away from my site thinking I'm running dangerous scripts. So its there a way i can make IE happy and run the code without the panic allert:
Here is the code for the main page:(I know its incomplete as I said it is just a little page to mess with)
<HTML>
<TITLE>Pull-Down Menus</TITLE>
<HEAD><LINK href="style4.css" type="text/css" rel="stylesheet">
<STYLE TYPE="text/css">
#menu1 { display : none }
#menu2 { display : none }
#menu3 { display : none }
a:link {color:black; text-decoration:none}
a:hover {color:blue; text-decoration:underline}
</STYLE>
</HEAD>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<TABLE BORDER="0" class="menu_1">
<TR>
<TD VALIGN="top" WIDTH="200">
<SPAN onMouseOver="document.all.menu1.style.display = 'block'" onClick="document.all.menu1.style.display = 'none'"><div id="myMenu2"><a href="#">
<FONT SIZE="-1"><b> Poo Menu 1</b></FONT><BR></a></div></SPAN>
<SPAN ID="menu1" onClick="document.all.menu1.style.display = 'none'">
<div id="myMenu">
<a href="page2.html">Page2</a>
<a href="/tutorials/buttons/">Poo1</a>
<a href="/tutorials/buttons/">Poo2</a>
<a href="/tutorials/buttons/">Poo3</a>
<a href="/tutorials/buttons/">[-] Click to close</a>
</div>
</SPAN>
</TD>
</tr>
</table>
</body>
</html>
and here is the CSS code linked to it:
.menu_1{
position:absolute;
left:600px;
top:70px;
}
#myMenu {
width: 100%;
background-color:#ffffff;
}
#myMenu span {
display: none;
visibility: hidden;
}
#myMenu a {
display: block;
padding-right: 0.4em;
padding-left: 0.5em;
padding-top: 0.2em;
padding-bottom: 0.2em;
text-decoration: none;
}
#myMenu a:link {
background-color:#CCCCCC ;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
COLOR: #000000; TEXT-DECORATION: none; Font-Size:10px; font-weight:normal;
border-top: solid #ffffff 1px;
}
#myMenu a:visited {
background-color: #CCCCCC;
color: black;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
COLOR: #000000; TEXT-DECORATION: none; Font-Size:10px;
border-top: solid #ffffff 1px;
}
#myMenu a:hover {
background-color: #54A4DE;
color: white;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION: none; Font-Size:10px; font-weight:bold;
border-top: solid #ffffff 1px;
}
#myMenu a:active {
background-color: ##CCCCCC;
color: white;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
COLOR: #000000; TEXT-DECORATION: none; Font-Size:10px;
border-top: solid #ffffff 1px;
}
/*---navigation control Secondary---*/
#myMenu2 {
width: 100%;
background-color:#ffffff;
}
#myMenu2 span {
display: none;
visibility: hidden;
}
#myMenu2 a {
display: block;
padding-right: 0.4em;
padding-left: 0.5em;
padding-top: 0.2em;
padding-bottom: 0.2em;
text-decoration: none;
}
#myMenu2 a:link {
background-color:#CCCCCC ;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
COLOR: #000000; TEXT-DECORATION: none; Font-Size:10px; font-weight:normal;
border-top: solid #ffffff 1px;
}
#myMenu2 a:visited {
background-color: #CCCCCC;
color: black;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
COLOR: #000000; TEXT-DECORATION: none; Font-Size:10px;
border-top: solid #ffffff 1px;
}
#myMenu2 a:hover {
background-color: #FB0E0E;
color: white;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION: none; Font-Size:10px; font-weight:bold;
border-top: solid #ffffff 1px;
}
#myMenu2 a:active {
background-color: ##CCCCCC;
color: white;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
COLOR: #000000; TEXT-DECORATION: none; Font-Size:10px;
border-top: solid #ffffff 1px;
}
Thanks in advance for your help :)
Plastic_Fork
03-20-2005, 11:02 AM
As far as I know, there's no way around it for Internet Exploder. People will either have to set their security settings lower or just allow the popup from your website.
I might be wrong, but that's my take on it anyway.
I might be wrong, but that's my take on it anyway.
Neutrino
03-20-2005, 06:28 PM
As far as I know, there's no way around it for Internet Exploder. People will either have to set their security settings lower or just allow the popup from your website.
I might be wrong, but that's my take on it anyway.
Its not a pop-up, just a script to make drop down menus (just like windows when you click on start). Unfortunatelly the hardened Sp2 version of Exporer sees my script as potentially dangerous, blocks it, and gives that banner warning at the top. Yes you can click on it and enable the script but I'm afraid that warning might scare people away from my site.
I was wondering if anyone has any idea which part of my script causes that stupid paranoid warning so i can change it.
I might be wrong, but that's my take on it anyway.
Its not a pop-up, just a script to make drop down menus (just like windows when you click on start). Unfortunatelly the hardened Sp2 version of Exporer sees my script as potentially dangerous, blocks it, and gives that banner warning at the top. Yes you can click on it and enable the script but I'm afraid that warning might scare people away from my site.
I was wondering if anyone has any idea which part of my script causes that stupid paranoid warning so i can change it.
Plastic_Fork
03-20-2005, 07:49 PM
Well, I'm out of my league here then. Webpage coding is not one of my strong points. Sorry I couldn't have been more help.
Neutrino
03-20-2005, 10:01 PM
Update: I heard IE is giving me that mesage becasue the script is on my local machine and this will not be an issue when I'll upload it to a web server. So lets hope that will solve my problems.
Thanks for the replys. :)
Thanks for the replys. :)
Automotive Network, Inc., Copyright ©2026
