Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.2

Bug #14499 working with AJAX
Submitted: 2008-08-13 17:31 UTC
From: skianter Assigned:
Status: Open Package: HTML_TreeMenu (version 1.2.1)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2008-08-13 17:31 UTC] skianter (Carlo Carlo)
Description: ------------ I'm making ajax call to a php script that contains this: $menu = &HTML_TreeMenu::createFromStructure(array('structure' => $tree_struct)); // Create the presentation class $treeMenu = &new HTML_TreeMenu_DHTML($menu, array('images' => 'libconf/pear/HTML/images', 'defaultClass' => 'treeMenuDefault')); $treeMenu->printMenu(); and I'm putting the output in a <DIV>. first of all, in IE there'is the first problem because it doesn't like the <script> tag...so I have to remove that from the HTML_TreeMenu_DHTML.toHTML()... In this way IE put the output in the DIV as required. With Firefox there isn't that problem. Then I try to (javascript) eval this output so that JS draw the tree, but it draws on a new page... How to draw in the DIV?

Comments

 [2008-08-13 18:35 UTC] skianter (Carlo Carlo)
it is necessary to change the TreeMenu.prototype.writeOutput in Treemenu.js: change document.write(this.output); to: objerHTML = this.output; and pass obj as parameter
 [2008-08-13 18:36 UTC] skianter (Carlo Carlo)
pardon... obj.innerHTML = this.output;