I'm trying to generate a select submenu based on a selection from the
primary menu using Dommy:
(doseq [n [1 2]]
(d/listen! (sel1 (keyword (str "#region" n)))
:click
(d/set-html! (sel1 (keyword (str "#sel" n)))
(str "<select name=\"zone" n "\"><option
selected=\"selected\" value=\"\">-- Nearest Location --</option>"
(reduce #(str %1 %2)
(map #(str "<option value=\"" (%
0) "\">" (% 1) "</option>")
(locations (keyword (sel1
(keyword (str "#region" n)))))))
"</select>"))))
... but the menu isn't populated from the locations map. I suspect the
culprit is:
(locations (keyword (sel1 (keyword (str "#region" n)))))))
... but I'm not clear on how to get a selected value from the primary
menu. Is there a :change option within Dommy mirroring the original
JQuery is used:
$('select#region' + n).change(function()
?
gvim
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.