Jquery Decision Tree

136 views
Skip to first unread message

Mark Billion

unread,
Dec 8, 2016, 12:38:08 PM12/8/16
to web2py-users
Im really looking just for some suggestions of particularly light weight ones....

Massimo Di Pierro

unread,
Dec 9, 2016, 10:52:26 AM12/9/16
to web2py-users
Sorry I just got It. My recommendation is to use vue.js

here is an example

<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <div id="app">
      <input v-model="a" type="checkbox">
      <div v-if="a">
        <input v-model="b" type="checkbox">
        <div v-if="b">
          <input v-model="c" type="checkbox">
          <div v-if="c">
            <input v-model="message">
            <button v-on:click="shoot()">Shoot!</button>
          </div>
        </div>
      </div>
      <div>a: ${a}, b:${b}, c:${c}, message:${message}</div>
    </div>
  </body>
  <script>
    var app = new Vue({
      el: '#app',
        delimiters: ['${', '}'],
        data: {
          a: false,
          b: false,
          c: false,
          message: 'Hello Vue!'
        },
        methods: {
          shoot() { alert('shoot ' + app.message); }
        }
    });
  </script>
</html>

You can use {{=ASSIGNJS(x=y)}} to pass a web2py variable y to a js variable x.

Massimo Di Pierro

unread,
Dec 9, 2016, 11:32:22 AM12/9/16
to web2py-users
To other web2py users. 

I would like to add that Mark Billion is a lawyer from Delaware. He is a terrific lawyer. Most importantly is the only lawyer I know who is also a developer. This is a unique set of skills and some of you may find valuable.

Massimo

Ron Chatterjee

unread,
Dec 13, 2016, 6:57:31 PM12/13/16
to web2py-users
Sure the new president elect will. lol. jk:-). I am good for now but thanks for sharing Massimo. 
Reply all
Reply to author
Forward
0 new messages