Displaying 20 results from an estimated 22 matches for "text_area_tag".
2009 Feb 15
2
text_area_tag not escaping content by default
I stumbled on the fact that text_area_tag does not HTML escape its
content by default. For example:
text_area_tag "body", "</textarea><script>alert(''xss'');<script>"
If you try that, you''ll see that the content is inserted literally.
Considering the fact that the tag helpe...
2008 Jun 02
2
text_area_tag
Hi
How can I set value for text_area_tag..I tried
<%= text_area_tag "transfer_reason#{div_no}", nil, :size => "50x1",
"value"=>params[:transfer_reason] %>
But not working
Thanks in advance
Sijo
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You...
2006 Jan 21
1
text_area content with text_area and not text_area_tag ?
Hello,
Is it possible to fill the textarea content when using the text_area
function ?
Why there is 2 , + or - similar class : FormHelper and FormTagHelper ?
2005 Dec 22
3
NewbieQ : undefined method `stringify_keys!'' Dumb Question
Hi,
I''m running round in circles again! I''m trying to save a note that has a
HABTM relationship with a job. The note is new - the job exists.
In my partial for notes I have ;
<%= start_form_tag :action => ''new_note'', :id => @job %>
<%= text_area_tag "note", nil, :size => "65x10" %>
<%=submit_tag ''Add Note'', :note => @job.note %>
<%= end_form_tag %>
Which exists on a page containing another partial with job data.
In the controller there is ;
def dashboard_job_update
@job...
2013 Jan 27
2
Help displaying text
...display it in a field so I can control its vertical and horizontal size
on the page. When it is displayed on the page now, rather than
interpreting the HTML, it is output into the text field as a string with
all HTML tags showing. What am I doing wrong??
<div id = "A">
<%= text_area_tag id="cka",(@formatted_question[:anno_a]) %>
</div>
Any help would be greatly appreciated
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this gro...
2008 Apr 06
10
about the form_for ..
question one:
is there any select box tag for form_for?
now,perhaps i just can use the select or select_tag?
question tow:
i have a A model,it has one B such as:
class A< ActiveRecord::Base
belongs_to :B
when i use the form_for tag,how can i output the variable name?like
this:
<%form_for :a,@a,:url=>{:controller=>"a",:action=>"save"} do |f|%>
2006 Feb 07
3
in place edit, save on blur
I thought I''d seen some discussion on this, but can''t find it. I have
a text area that I''d like to save on blur unless the user clicks
cancel. Anyone got a nice example of this? It''s non-obvious to me
how I force the submit via javascript. Thanks,
pt.
--
Parker Thompson
http://www.parkert.com/
510.541.0125
2013 Jan 23
0
wysihtml5 for rails
...I want to hide the buttons on
some occasions and more importantly need to set it to a read only mode
on a particular page so users can click on URL''s in the WYSIWYG text
area.
My current setup...
gem ''wysihtml5-rails'' in gemfile
In "show'' page...
<%= text_area_tag id="ck_a", @formatted_question[:anno_a],
:class=>''wysihtml5'' %>
<script type="text/javascript">
$(''.wysihtml5'').each(function(i, elem) {
$(elem).wysihtml5();
});
</script>
Also, not s...
2006 Jul 31
4
Text field not being submitted via form_remote_tag; works via form_tag
Hi everyone,
Newbie here. I''m trying to get a textual form element to submit in
the context of a form_remote_tag block and having little success.
Oddly (or perhaps not), using regular old form_tag in its place does
cause the elements to be submitted. Here''s the relevant partial ERb
code:
<%= form_remote_tag( { :url => { :action => :out, :id => pending_task } } )
2006 Aug 14
4
Updating a table with Ajax
...d a comment</a>.</p>
<div id=''add_comment'' style=''display: none;''>
<%= form_remote_tag :update => ''comment_list'', :position => :bottom,
:url => {:action => ''add_comment''} %>
<%= text_area_tag(''new_comment_text'', nil, :size => ''50x8'') %>
<%= submit_tag ''Submit'' %>
</div>
Then my _comments_list.rhtml partial:
<tr>
<div id=''comment<%= @comment.id %>''>
<td><div c...
2005 Dec 21
8
text_area
Hi I''d like to know how to add default text text area using the function
text_area. I ''ve tried using value = "....." to do this but with no
luck.
Could some one please answer my simple question?
Thanks.
Dan.
--
Posted via http://www.ruby-forum.com/.
2013 May 27
6
Headache with Ajax in Rails using jQuery
...Rails but did not work, so I turned to jQuery for Ajax. Basically, I
want to submit a form using Ajax:
<%= form_tag("/main/contact", :method => "post", :id => "contactForm")
do %>
Name: <%= text_field_tag(:name) %><br/>
Message: <%= text_area_tag(:message) %>
<%= submit_tag "Send" %>
<% end %>
<div id="result"></div>
And here''s my Ajax code in jQuery:
<script type="text/javascript">
$("#contactForm").submit(function(event) {
/* stop form from submitt...
2007 Dec 04
0
TextAreaWithStatus 1.0 released
TextAreaWithStatus 1.0 has been released
http://code.google.com/p/text-area-with-status/
== Overview ==
This plugin is extending builtin text_area and text_area_tag helpers
with the ability to display chars left up to a specified limit.
Basically it turns this:
<%= f.text_area :description, :onkeyup => "limit_chars(this, 100, $
(''chars_left''))" %><br />
<span id="chars_left">You have <%=...
2008 May 26
0
setfocus to a field in view
...r_transfer_search_sd" like
<div id="reason_for_transfer_search_sd" >
<%= render :partial =>
"service_desk_part/on_action_transfer_reason_sd_search", :locals => {
:sd_ticket=>sd_ticket } %>
</div>
And in on_action_transfer_reason_sd_search
<%= text_area_tag "transfer_reason", nil, :size => "50x1" %>
<%= link_to_remote "Submit",
{:with => "''transfer_reason='' + $(''transfer_reason'').value",
:url => { :controller => :service_desk,:action =>
:edit_serv...
2011 Mar 28
0
Token Poken :( I'm stuck with this
...;
<tr style="vertical-align:middle; text-align:left;">
<td width="400px" colspan="2" style="padding-top:10px;">
<span style="font-size:15px"><%= index+1 %>. <%= question.text
%></span><br>
<%= text_area_tag "answer_#{question.id}",@answers[question.id],
:cols=>"90", :rows=>"4", :class => ''inputBox'' %>
</td>
</tr>
<% end %>
</table>
<table border="0" width="900px" align="center"...
2006 Apr 12
4
Binding Text Field/Areas to Array?
Hi,
If I have @answers in my Controller, which is an array of Answer model
objects which don''t exist in the DB yet...
How do I bind a text_area helper in the View to each Answer? (I''m
pre-filling some of the Answers with other data people need to verify
before submitting and will insert on POST.)
I''ve been able to get the textareas to render but not with the
2007 May 15
5
Problem with RJS and/or Prototype.js =>ResponseText is blank
...mment
# This fails too
else
render :action => "show"
end
end
The form looks like this
<% form_remote_tag(:url => { :action => :comment },
:html => {:class => "margin-form" }) do %>
<label for="text">
Your Comment:
<%= text_area_tag(:text, "", :rows => 4, :cols => 50) %>
</label>
<label>
<%= submit_tag("add your comment ยป", :class => "submit",
:disable_with => "Sending comment…") %>
</label>
<% end %>
I''ve search...
2007 Sep 04
4
Could someone take a look at #9477 (new fieldset_tag helper)?
Hi everyone,
I just submitted a patch for a new fieldset_tag helper.
It''s helpful and encourages developers to follow web standards, etc.
"+1"s welcome :-)
http://dev.rubyonrails.org/ticket/9477
Cheers
Damian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
2008 Mar 14
8
Facebooker updates
I just went through and cleaned out most of the bugs and patches. I
also added a facebooker.js file that implements enough of prototype to
do $() and link_to_remote with :update and remote_form_for with :update
Let me know if you run into any issues with it.
Mike
--
Mike Mangino
http://www.elevatedrails.com
2006 Mar 31
18
Modelling Foreign Keys
Can someone point me to a reference or tutorial that shows how to map
foreign key relationships in the model?
For example given:
Users
id
name
email
Posts
id
user_id
title
How do I associate user_id with users.id in the Post and User models?
has_many and belongs_to don''t seem to do it.
--
Posted via http://www.ruby-forum.com/.