| Context menu class in document.write ¶ | |
| OK I managed to get both my main menu and my context menu working. The only remaining problem (and this is really more of a "nice to have") is that if I generate the elements that I want my context menu to appear on when I right click (in this case links) dynamically via javascript it doesn't work. In the section of my page where my treeview control appears I have a javascript that iterates through several of these: In the js code that builds the tree it takes these paramters and builds a table with indents and hrefs out of them. I modified that code so that instead of just printing the straight href it also adds an "id='mycontext'" into each items link. Ideally the context menu will only appear when someone right clicks on one of these treeview links. What happens though when the page loads is that the javascript generated portion of the page is completely ignored and only my statically defined hrefs pick up the context menu. I tried initiallizing DynarchMenu.setup after the tree is generated but that didn't change anything. Is it just not possible to get a context menu working on elements that are generated by Javascripts document.write? | |
| Re: Context menu class in document.write ¶ | |
| Well, as long as you call DynarchMenu.setup after your elements are generated, it should work fine. Just make sure you assign an ID to those elements that that you pass the correct ID in the class attribute of the LI defining the context menu, as described in the sample files related to context menus. I can provide further assistance if you can show me a piece of code to work on. ;-) A test URL would be great. | |
| last |
| Re[2]: Context menu class in document.write ¶ | |
| I can't give you a url unfortunately because it's on my private server that's not on the public internet. The line that builds the URLs written out via javascript is here: | |
| last |














