Bolo
March 22, 2007, 10:24pm
1
Hello
I would like a update a texteara with JS. with this simple code. It’s
working well
RJS
page[“objectif”].value = “test”
View
<%= f.text_area :objectif, :rows => 10 , :cols => 55 , :id =>
“objectif”%>
But when i try to test this code
page[“objectif”].value = page[“textarea”].value
Objectfis
Objectifs : <%= f.text_area :objectif, :rows => 10 , :cols =>
55 , :id => "objectif"%>
No working. Can you help me
Bolo
March 23, 2007, 1:50am
2
Bolo wrote:
Hello
I would like a update a texteara with JS. with this simple code. It’s
working well
RJS
page[“objectif”].value = “test”
View
<%= f.text_area :objectif, :rows => 10 , :cols => 55 , :id =>
“objectif”%>
But when i try to test this code
page[“objectif”].value = page[“textarea”].value
Objectfis
Objectifs : <%= f.text_area :objectif, :rows => 10 , :cols =>
55 , :id => "objectif"%>
No working. Can you help me
page[“textarea”].value isn’t a valid value. I am assuming your element
with ID textarea is a select drop down list, then it should be something
like this
page[“objectif”].value =
page[“textarea”].options[page[“textarea”].selectedIndex].value
Bolo
March 23, 2007, 9:02pm
3
Hello
i was testing this
@value =
page[“textarea”].options[page[“textarea”].selectedIndex].value
i have an error
[Break on this error] $
(“textarea”).selectedIndex().#<ActionView::Helpers::JavaScriptElementProxy:
0x30…
On Mar 22, 8:50 pm, Wai T. [email protected]