How to disable a button?

23 views
Skip to first unread message

big_earl

unread,
Nov 23, 2009, 3:20:43 AM11/23/09
to Nitrogen Web Framework for Erlang
Hi all,
I want to disable a button and tried the following but it did not
work:

wf:wire(delButton, #event{ type=timer,
delay=10,
actions=#script{ script="document.getElementByI
('delButton').disabled=true;" }}),

What am I doing wrong?

Br,
/Erland.

Rusty Klophaus

unread,
Nov 23, 2009, 9:19:53 AM11/23/09
to nitro...@googlegroups.com
Hi Big Earl,

Change the script in your action to: 

script="obj('delButton').disabled=true;"

In order to support nested elements, Nitrogen changes your element IDs, so document.GetElementByID will not work.

Best,
Rusty


--

You received this message because you are subscribed to the Google Groups "Nitrogen Web Framework for Erlang" group.
To post to this group, send email to nitro...@googlegroups.com.
To unsubscribe from this group, send email to nitrogenweb...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nitrogenweb?hl=.



big_earl

unread,
Nov 25, 2009, 2:24:13 AM11/25/09
to Nitrogen Web Framework for Erlang
Thanx!
/Erland.
Reply all
Reply to author
Forward
0 new messages