Hello all,
Here is basically the situation. I have an empty div on my page.
When I mouseover a word, the innerHTML of the div gets written with a
table. The td elements all have onclick, onmouseover, etc. events.
When I mouseover a word, the div appears, but none of the events fire
until another event occurs. For example, if I put in an alert box or
I right click, and then mouseover the div, the td events then work.
Keep in mind that the div is basically acting as a menu. So the
sequence of events that I'm seeing are as follows: mouse over a word,
div appears but none of the events are firing, right click to bring up
std context menu, left click to close, mouseover div again and events
fire.
Here is how I'm setting the innerHTML of the div (I know it could be
cleaner, I'm just testing something).
oContextMenu.innerHTML ='<table width="100" border="0" cellpadding="0"
cellspacing="1" bgcolor="#000000"><tr ><td bgcolor="#cdaf95"
onMouseOut="this.style.background=\'#F7F7F7\';hide Menu();"
onClick="setValue();hideMenu();" onMouseOver="this.style.background
=\'#E8E8E8\';this.style.cursor = \'hand\';">blah</td></tr></table>';
Any help would be appreciated.
teb 1 5014
Try using _return true_...
Just a thought
Ranbir
In article <67**************************@posting.google.com >, Teb wrote: Here is basically the situation. I have an empty div on my page. When I mouseover a word, the innerHTML of the div gets written with a table. The td elements all have onclick, onmouseover, etc. events. When I mouseover a word, the div appears, but none of the events fire until another event occurs. For example, if I put in an alert box or I right click, and then mouseover the div, the td events then work. Keep in mind that the div is basically acting as a menu. So the sequence of events that I'm seeing are as follows: mouse over a word, div appears but none of the events are firing, right click to bring up std context menu, left click to close, mouseover div again and events fire.
Here is how I'm setting the innerHTML of the div (I know it could be cleaner, I'm just testing something).
oContextMenu.innerHTML ='<table width="100" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000"><tr ><td bgcolor="#cdaf95" onMouseOut="this.style.background=\'#F7F7F7\';hide Menu();" onClick="setValue();hideMenu();" onMouseOver="this.style.background =\'#E8E8E8\';this.style.cursor = \'hand\';">blah</td></tr></table>'; This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: nick |
last post by:
Hi All.
I have a document loaded into browser. Later, I am loading some HTML
content (using hidden frame) and replace some part of my document with
new content, using innerHTML property.
The...
|
by: tshad |
last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an
asp.net problem or a javascript problem.
I have a page that was originally created from a program I found on the net...
|
by: Mike |
last post by:
Hi,
I am adding controls dynamically in a WebForm, but none of these controls' events fire. Here is the class code I am using. I have tried so many things, but nothing works :-(
namespace...
|
by: PlainDave |
last post by:
Hi all,
I'm new to javascript, so please be gentle. :-) I have a "tooltip"
script that I found somewhere, and I want to add html tags, links, etc.
to the tooltip window. I already use a couple...
|
by: tcole6 |
last post by:
My problem appears to be Firefox specific.
I have a hyperlink that loads a new window. This window contains
hyperlinks that call javascript functions in the parent window and then
closes the...
|
by: huzheng001 |
last post by:
I have develop a on-line dictionary website, http://www.stardict.org
I meet a problem:
Here is two lines of js codes:
document.getElementById("wordlist").innerHTML = "";...
|
by: ensemble |
last post by:
I'm trying to utilized a more object-oriented approach to managing
window events in javascript. Thus, I am creating a "controller" object
to handle events and interact with the server. However, I...
|
by: Safalra |
last post by:
Recently I've rewritten much of my old Javascript code to use DOM functions
so that enhancements can be attached to documents without needing to alter
the HTML code. I assumed that adding event...
|
by: Joergen Bech |
last post by:
I sometimes use delegates for broadcasting
"StateChanged" events, i.e. if I have multiple forms
and/or controls that need updating at the same time
as the result of a change in a global/common...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |