Hi,
I’ve spent a lot of time trying to figure this out, and I have a suitable solution finally, but not sure if it is the best. Maybe someone can help.
What I’ve created is a chat room, and I needed a right-click context menu on the usernames that show up in the chat. So obviously if a user has posted several messages, the context zone would all be the same ID, which doesn’t work. So what I’ve done is make the id instead the username + current time in seconds. That makes them all unique and it works. However, I could be creating potentially a thousand or more context zones in a day. Could that be a problem? Do you know of a better solution?
Another issue is for each line I’ve got a Div container surrounding the whole line of text, then the username is wrapped in just a that has the contextZone ID. When I right-click on the username, the context menu is over to the right. It’s almost as if it wants be outside of the surrounding Div. If I remove the surrounding Div, the context menu doesn’t work at all. Should it not be able to bind to a with an ID?
So is my method in the first paragraph ok to do with the unique IDs?
And how do I get the context menu drop right below a inside a surround Div?
Thanks,
Max