Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

javascript function in Xml file

By
Silviaa
on 1/17/14, 7:46 AM 678 views

I'm trying to call a javascript code in XML file but it doesnt fires the action.

  <html>
   <head>
    <script type="text/javascript">
        function drawTree() {
          var data = [          
            {
             "firstname": "S",
              "lastname": "Brown",
              "age": 16,
            }];      
          var options = {
            'width': '400px',
            'height': '200px'
            };       
        var container = document.getElementById('mytree');
        var tree = new links.TreeGrid(container, options);      
        tree.draw(data);
        }
   </script>
 </head>
 <body onload="drawTree();">
  <div id="mytree"></div>
 </body>
</html>

Could please Anyone help me how to refine my code ?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 1/17/14, 7:46 AM
Seen: 678 times
Last updated: 3/16/15, 8:10 AM