Label or span for displaying data?

Hello All,

I have a form with a text-area and a submit button.The user can write
one’s status in the text-area and click on submit button.After
clicking on the submit button,I want the status to be displayed
immediately on the page.What is the best way to do this in Rails?Does
the label tag solve my problem here? or should I use a span tag?

The piece of code is as follows


 <div id="msg_div" style="padding-left:20px;padding-top:

1px;height: 38%;">


<%
form_for :about_me ,
:url=>{:controller=>‘home’,:action=>‘update_about_me’},
:html=>{:name=>‘frmpostchannellist’,:style
=> ‘margin:0px;’} do %>

Please write a few comments about
yourself








<%=
APP_CONSTANTS[‘post_msg_length’]%>

characters remaining





<%= submit_to_remote “create_btn”,"
",
:update => “display_my_status”,
:loading =>
“Element.setOpacity(‘widget’,‘0.4’);Element.show(‘spinner_page’);”,
:loaded =>
“Element.setOpacity(‘widget’,‘1’);Element.hide(‘spinner_page’);document.frmpostchannellist.message.value
= ‘’;document.getElementById(‘remaining’).innerHTML = 400;”,
:url => {:controller=>“home”, :action
=> “update_about_me”},
:html => {:class => “searchButton
feedBackSubmitBtn”, :id => “submitButton” } %>



<% end %>


                      <%=h @my_status%>

                 </span>


               </div>
                </div>

Also I want to know what id do I give in the update statement in the
submit_to_remote tag?

Thanks in advance

Regards
Chandrika

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs