   (.log js/console "inside e-trade"))
 
 (defn e-edit-data-save [e]
-  (let [data (.-value (.-firstChild (.-parentNode (.-parentNode (.-parentNode (.-target e))))))]
+  (let [data (.. e -target -parentNode -parentNode -parentNode -firstChild -value)]
     (save-data data e)))
 
 (defn e-edit-data-cancel [e]


;; find "index" (from g/traders) of selected trader
(defn find-selected-trader [e]
  (let [children (.-children (aget (.-children (.-form (.-target e))) 1))]
    ;; this "loop" is needed coz children is HTMLElements which is *not* iterable
    (loop [i (dec (.-length children))]
      (if (= -1 i)

         g/overlay-state
         {:target (. js/document (getElementById "overlay"))})

(om/root c-app
         g/app-state
         {:target (. js/document (getElementById "main"))})
