| Ajax + Context Menu ¶ | |
| I am using this to create a context menu on a list that is generated with jquery/ajax. On a successful ajax request I fire the DynarchMenu.setup('menu1',{params}). And this works just fine. However, if I update the list in anyway (column sort, go to next page) that does not require a complete page reload, jsut the ajax to fire and update the list I get the "Error: menu element not found". Why is it doing this? The script, even on ajax pefrorms the Menu.setup function as a final step. Is there some way to get the menu to work with ajax? | |
| Re: Ajax + Context Menu ¶ | |
| ok, i have narrowed it down to a line of code. It is: if(typeof el=="string")el=window.self.document.getElementById(el); I have checked the function and I am passing a string so I guess that the function cannot find the Element by ID. On ajax reload. any suggestions? | |
| last |
| Re[2]: Ajax + Context Menu ¶ | |
| another day of looking into this: I think what is happening is when the page loads the dynarch creates a class in javascript for DynarchMenu. This is stored in the javascript. The UList at this point is destroyed as it was. So I am creating a UL class with an id of "menu1". The page when it loads is creating a DynarchMenu and destroying the list. So on ajax requests, I am asking for a new list using "menu1", but now the html 'menu1' is nonexistant. So I need to either Ideas or suggestions? | |
| last |














