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  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 48 + 3 = ?

 
 [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;