The problem is the setTextContent function from Google closure. Text
content is the text within a div, span, p, label etc but not the value
of an input element. Likewise getTextContent on field1 returns "",
rather than the value "Hello World!".
The following clojurescript can set the value of a text input field:
(set! (.value (dom/getElement "field2")) (.value (dom/getElement
"field1")))

This is the clojurescript translation for this javascript assignment:
document.getElementById('field2').value=document.getElementById('field1').value

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to