11155
(-- --)
March 3, 2010, 11:04am
1
hi!
I have a normal text input box on a page. The controller renders results
to another div, but I need to clear the content of the input box after a
search. Most of my interaction is done with something like
page.replace_html('div',newcontent)
but in this case the element I am addressing is a inputbox and doesn't
have inner html, only a value? how can I adress this value?
As always, your patience is greatly appreciated.
Regards
Pieter
11155
(-- --)
March 3, 2010, 1:39pm
2
page['search_field'].value = ''
Replace 'search_field' with the actual ID of your search field
11155
(-- --)
March 3, 2010, 2:20pm
3
Sharagoz -- wrote:
page['search_field'].value = ''
Replace 'search_field' with the actual ID of your search field
Hi Sharagoz
Thanks a million. Obvious... My brain is getting to old for this stuff.
Would it be possible to set other specific attributes of DOM elements in
the same way?
eg would
page['id_of_element'].enabled = false
work?
thanks again
11155
(-- --)
March 3, 2010, 2:31pm
4
Would it be possible to set other specific attributes of DOM elements in
the same way?
Why dont you experiment with it yourself to learn this, now that you
know the syntax
would page['id_of_element'].enabled = false work?
I dont think so, but "disabled = true" will work
11155
(-- --)
March 3, 2010, 2:59pm
5
Sharagoz -- wrote:
Would it be possible to set other specific attributes of DOM elements in
the same way?
Why dont you experiment with it yourself to learn this, now that you
know the syntax
would page['id_of_element'].enabled = false work?
I dont think so, but "disabled = true" will work
I am humbled. Thanks again!