Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Css/js Menu - Visible When Loading

Featured Replies

Hello!

 

I have a CSS menu that uses JS to control the mouse on and off events. I also have a large flash file on a page. If I empty my cache and visit the page as if it were the first time, the page obviously loads, however, while it is doing this, the menu drop down boxes remain visible until it is fully loaded. And on the page with the flash, this menu remains visible until I either activate the JS control by putting the mouse on and off the menu, or until the flash or page has finished loading.

 

 

Can anyone provide me with some light and help me figure out how to stop this?

 

Thank you very much

 

ST

Is there anyway you can offer a link to the page being tested... I am not the Js or Flash person to offer advice, but when they do arrive in the office, I am sure they would find you the solution quicker with a view of the problem in action. You can always PM me the link and I can post it on your behalf (providing you are not selling products beginning with V, or T and then P).

The code can only be offered for the moment :

<div id="menu">
<dl>
<dt onmouseover="java script:montre();"><a href="index.html" title="Home">Home</a></dt>
</dl>

<dl>
<dt onmouseover="java script:montre('smenu1');">Menu Title</dt>

<dd id="smenu1" onmouseover="java script:montre('smenu1');" onmouseout="java script:montre();">
<ul>

<li><a href="aplace">Sub Item</a></li>
<li><a href="aplace">Sub Item</a></li>
<li><a href="aplace">Sub Item</a></li>
<li><a href="aplace">Sub Item</a></li>

</ul>
</dd>
</dl>

HERE IS THE HEADER CODE FOR THE JS:

<script type="text/javascript">
<!--
window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
for (var i = 1; i<=10; i++) {
if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
}
if (d) {d.style.display='block';}
}
//-->
</script>

AND THE CSS:

#menu {
position:absolute;
z-index:100;
width: 930px;
}
#menu dl {
float: left;
width: 110px;
margin: 0 1px;
}
#menu dt {
cursor: pointer;
text-align: center;
}
#menu dd {
border: 1px solid gray;
}
#menu li {
text-align: center;
background: #fff;
}
#menu li a, #menu dt a {
color: #000;
text-decoration: none;
display: block;
height: 100%;
border: 0 none;
}
#menu li a:hover {
background: #eee;
}

#menu dt a:hover {
background: none;
}

If anyone has any thoughts to help out, please help out our colleague (Franglix is only the passer on).

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.