11155
(-- --)
July 22, 2010, 11:41am
1
I'm creating a very simple Rails application where I enter "First
number" and then "Second number" and get the result in the "Sum".
Those are some files:
show.html.erb: http://pastie.org/private/1cydign77xnijlrb7mjvng
_form.html.erb: http://pastie.org/private/narsz5oeuafahclqtvmwq
What do I want?
I just want the Sum to be DISPLAY the summation result automatically
after entering the first and second numbers, without having a text box
beside some.
I think it may be a HRML/CSS touch?
What should I do here?
Thanks.
11155
(-- --)
July 22, 2010, 11:53am
2
Abder-Rahman Ali wrote:
I'm creating a very simple Rails application where I enter "First
number" and then "Second number" and get the result in the "Sum".
Those are some files:
show.html.erb: http://pastie.org/private/1cydign77xnijlrb7mjvng
_form.html.erb: http://pastie.org/private/narsz5oeuafahclqtvmwq
What do I want?
I just want the Sum to be DISPLAY the summation result automatically
after entering the first and second numbers, without having a text box
beside some.
I think it may be a HRML/CSS touch?
What should I do here?
Thanks.
If you want to populate the sum field with the result of first number +
second number, consider JavaScript.
11155
(-- --)
July 22, 2010, 11:57am
3
Thanks Pale, cannot I use CSS for that. I'm actually not aware of
Javascript.
11155
(-- --)
July 22, 2010, 12:23pm
4
Pale Horse wrote:
Abder-Rahman Ali wrote:
Thanks Pale, cannot I use CSS for that. I'm actually not aware of
Javascript.
Do no not use CSS for this; CSS is for styling your page. If you're not
familiar with JavaScript, can I suggest you start here:
JavaScript Tutorial
Got you Pale.
So, you mean that even I have the result, I cannot display it using CSS
since it is for styling?
I'll check Javascript then.
Thanks a lot.
11155
(-- --)
July 22, 2010, 5:58pm
5
Thanks a lot Marnen for your nice recommendations and advice.