I think this may be a broswer bug rather than anything wrong with the menu but here is the scenario.
On a web page we have a couple of animated icons (spinning globe for the web, rotating 'email' logo for mail) for the kids.
These work fine in conjunction with the menu opening and closing and suchlike.
But, there is a 'faq' part to the menu, when you click on a menu it opens up a Java message window (the one with the exclaimation mark in a yellow triangle).
After this opens it stops the animation in the images. You have to refresh the page to start them again.
I was just wondering if anyone else had the same problem?
Java window 'bug'
- fredlongworthhighschool
- Mega Advanced
- Posts: 362
- Joined: Fri Jun 27, 2003 11:34 am
- Location: Manchester, England.
- Contact:
Java window 'bug'
Andy Davis
Web Designer & Smartboard Manager
Fred Longworth High School, Manchester, England.
Web Designer & Smartboard Manager
Fred Longworth High School, Manchester, England.
You will also notice this on the forum too...when you click to add a smiley, the smiley animations stop. This has to do with the way javascript is being called. The way to prevent this is to not call the javascript from the href of an <a> tag. Doing this: <a href="javascript:doSomething();"> will cause the animated gifs in a page to fail. To correct the problem, you need to use the onClick event like this <a onClick="doSomething();return false;" href=#>. Its better to return false (unless you need it to be true) to make sure the animated gifs dont stop, but sometimes you dont need it..not sure why. YOu can also make doSomething() return false as well.
Now, the problem now lies with the menu. As far as I can tell, there is no onClick parameter, just the url which we use to send javascript. To get around this, Andy, we will need to implement an onClick property of the aI function that will allow one to assign something to the onClick event of the menu item. Whaddya think Andy?
Now, the problem now lies with the menu. As far as I can tell, there is no onClick parameter, just the url which we use to send javascript. To get around this, Andy, we will need to implement an onClick property of the aI function that will allow one to assign something to the onClick event of the menu item. Whaddya think Andy?
Dave Hergert
Software Engineer
"Helping to make the menu better, one
at a time."
Software Engineer
"Helping to make the menu better, one

- fredlongworthhighschool
- Mega Advanced
- Posts: 362
- Joined: Fri Jun 27, 2003 11:34 am
- Location: Manchester, England.
- Contact:
- fredlongworthhighschool
- Mega Advanced
- Posts: 362
- Joined: Fri Jun 27, 2003 11:34 am
- Location: Manchester, England.
- Contact:
I've finally got aroun to looking at this. The problem is that I don't call the script from a <a> tag. Instead I am doing the following:
Code: Select all
aI("text=I cannot log on. What do I do?;url=javascript:alert(jsi)");
Andy Davis
Web Designer & Smartboard Manager
Fred Longworth High School, Manchester, England.
Web Designer & Smartboard Manager
Fred Longworth High School, Manchester, England.
Actually Andy, you are using an <a> tag. In the menu, when you specify the url= field, it takes whatever you put there and puts it into the href attr. of an <a> tag. Heres the raw HTML for a menu item that my menu generated.
[/size]
As you can see, the javascript call is in the href of the <a> tag and thats the problem IE has, that when its in the href, it causes other things to stop. Try having whatever function it is that you are calling return false to see if that clears up the problem. In the meantime, maybe the menu could support an onClick attrbute for menu items that would put whatever you want in the onClick even of the <a> tag. We'll see...
Code: Select all
<TD id=el9 onmouseover=_popi(9); style="BORDER-RIGHT: 0px; PADDING-RIGHT: 3px; BORDER-TOP: 0px; PADDING-LEFT: 3px; FONT-WEIGHT: normal; FONT-SIZE: 90%; BACKGROUND: #ecf6ff; PADDING-BOTTOM: 3px; BORDER-LEFT: 0px; CURSOR: hand; COLOR: #000000; PADDING-TOP: 3px; BORDER-BOTTOM: 0px; FONT-STYLE: normal; FONT-FAMILY: Verdana, Arial" onclick=lc(9);c_openMenu(9) onmouseout='_mot=setTimeout("itemOff(9)",100)' itemOn="0">\
<A id=lnk9 href="javascript:alert('You Clicked Me!')"></A>JavaTest</TD>
As you can see, the javascript call is in the href of the <a> tag and thats the problem IE has, that when its in the href, it causes other things to stop. Try having whatever function it is that you are calling return false to see if that clears up the problem. In the meantime, maybe the menu could support an onClick attrbute for menu items that would put whatever you want in the onClick even of the <a> tag. We'll see...
Dave Hergert
Software Engineer
"Helping to make the menu better, one
at a time."
Software Engineer
"Helping to make the menu better, one
