Displaying 20 results from an estimated 2000 matches similar to: "different mouse event when using link_to_remote"
2007 Mar 09
0
link_to_remote with onmouseover event
Anyone have a better method for having the onmouseover event (or any
other mouse event) instead of onclick when using link_to_remote:
This is what I did, but I''d i have to create one for every mouse
event, can''t figure out how to call a mouse event via an argument .
anyone else run into this problem. Thanks
def link_to_remote_mover(name, options = {}, html_options
2006 Dec 17
0
unterminated string literal
Hello,
I am not able to solve this problem on my own.
I have a nested Div tag like this:
<div id="training" >
<div id="daytraining" >Training
</div>
</div>
Some other elements should insert content here by:
<%= content_tag("div" ,"Training",:id => "#{training.date.day}" ,
:onmouseover =>
2006 Feb 27
0
Example code for select_from_db (a.k.a. combo box)
I''m not asking for help this time! :) :) In almost every Rails
project I create, I find that I want a select() popup menu that is
pre-populated by data from the database. Also, I want an "Other..."
option that presents a text_field_tag to input another (not
presented) option (basically a combo-box). In an attempt to be as
DRY as possible, I''ve come up with
2006 Dec 05
1
Using render inside a FormBuilder (EdgeRails)
I''m using the latest trunk of 1.2-ish, and I''m wondering how to do what
I want to do. I am using a form_for :builder I wrote, simply called
TableFormBuilder after the rails cookbook, and want to be able to
present help icons automatically. I want these icons to appear next to
form fields I am rendering.
For example, I have this method in helpers/table_form_builder.rb:
# This
2006 Jul 08
10
A rant about parameters
Guys,
I''ve been chasing a problem with country_select for the past few hours
now. My intention was pretty simple...use the following line in a form:
<p><label for="country_region">Country</label>
<%= f.country_select :country_region, "United States" %></p>
However, for the life of me, I couldn''t get it to work. I kept getting
2011 Apr 05
0
block method output is generating twice
write a block method to print a list
def column (&block)
if block_given?
content_tag(:li, capture(self, &block))
else
content_tag(:li, "")
end
end
and using it as
<%= data_list_for @leads, [" :10", "Age:30", "Contact:140", "Phone:
140", "Email:180", "Company:100", ""] do |l| %>
<%=
2006 Apr 30
0
Using a DIV or SPAN for a content_tag (link_to_remote)
I was wondering if there was an easy way to over ride the <a> tag
that is used as the content_tag() value when using link_to_remote(),
perhaps using a SPAN or DIV. I see follow the chain in the source
code and I guess I could write my own helper, but I was wondering if
there was a way to do this already?
I know already that SPAN''s and DIV''s are not supported
2007 Jul 15
0
errors_for
Been playing with merb.
One of the helpers I liked in rails was on form validations. Found
this was real easy to port over, so I thought I''d share.
It doesn''t highlight the field with the error, but it gives that same
nice little div on top.
Say I had an articles controller
def create
@article = Article.new(params[:article])
@article.save!
redirect
2008 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here:
http://wiki.developers.facebook.com/index.php/Facebook_Styles
I included testing and comments. I hope you find it useful.
Curiously, it''s really a small extension of FBML.
Richard
-------------- next part --------------
Index: test/rails_integration_test.rb
2008 May 24
1
link_to_remote, image_tag, mouseover is this possible?
Hi guys,
I was wondering if you are able to have a link_to_remote, having an
image_tag and the link_to_remote has a mouseover event that updates a
div. Does the image_tag need the mouseover event? I currently have:
<%= link_to_remote(image_tag(@p_image.public_filename(:thumb)), :update
=> "big_pic", :onmouseover => {:action => :color_change, :id =>
@p_image.id})%>
2005 Mar 24
5
Using html_options with link_to_remote??
Why doesn''t this output class="delete" into my html?
<%= link_to_remote image_tag("delete"), :update => "relationship_" +
@relationship.id.to_s, :url => { :controller => "relationships", :action
=> "destroy", :id => @relationship.id }, :html_options => {:class =>
"delete"} %>
Regards,
Ben
2006 Jul 14
4
Help with link_to_remote or javascript generator
Hi all,
I''m a relative noob to rails so I apologize in advance for asking such a
basic question.
I am trying to do multiple AJAX calls using the link_to_remote helper or the
JavaScript generator update_page. I have googled and read the docs for
both, but can''t seem to figure out exactly what i need to do.
Say I have the following html:
<div
2005 Oct 11
2
Pushing Javascript Helper to external file.
I have a table and when I mouseover a row I want a pop-up with some
additional information for that specific row (called remotely).
I can do this easily with something along the lines of...
onmouseover="<%= remote_function(:updated => "notediv", :loading => "
Element.show(''note'');", :url => {:action => ''get_note'', :id
2006 Jan 08
0
link_to_remote(image_url url_for_file_column(product, "image
I apologise for bad formatting. I don''t know how to make it nice in an
email
How do you nest image_url tags into link_to_remote tags. The following
creates the error:wrong number of arguments (3 for 2)
<%= link_to_remote(image_tag url_for_file_column(product, "image_url"),
{ "class" => "small_product",
2006 May 23
0
html "class" attribute for "link_to_remote"
Hi,
now this should be easy, but for some reason I was not able to generate
a link with a "class" attribute using "link_to_remote".
I tried several different ways, including the one that worked for
"link_to", but so far no luck.
I have to admit that I am not 100% sure how to read the rDoc
documentation. If it says:
link_to_remote(name, options = {},
2006 May 14
0
Beware of HashWithIndifferentAccess#symbolize_keys!
Hi,
I just posted a patch tot he rails trac for a bug we found where
running symbolize_keys! on a HashWithIndifferentAccess will delete all
items from the hash. Please make sure you either never call
symbolize_keys! (or to_options! which just alias it) on a
HashWithIndifferentAccess, or apply the path attached from the ticket
at: http://dev.rubyonrails.org/ticket/5076
I also posted a much longer
2007 Sep 30
2
Outputing to the browser, how?
Hello,
I''m writting some helper methods to write forms, so I have this working code:
class TableFormBuilder < ActionView::Helpers::FormBuilder
["file_field", "password_field", "text_field"].each do |name|
define_method(name) do |label, *args|
@template.content_tag(:tr,
@template.content_tag(:td,
@template.content_tag(:label,
2007 Mar 15
1
Helper content_tag and Blocks
The content_tag helper allows you to do things like:
content_tag(:p, "Hello world!")
# => <p>Hello world!</p>
It can take in blocks, for functionality like this:
<% content_tag :div, :class => "strong" do -%>
Hello world!
<% end -%>
# => <div class="strong"><p>Hello world!</p></div>
Unfortunately blocks
2009 Feb 09
0
submit_to_remote change from 2.1 to 2.2 now gives wrong number of arguments
Hi,
this snippet
<%= submit_to_remote(''create_button'', ''Add Phone'',
:submit =>
"phone_form",
:url =>
send( "#{@phonable_type.to_s.downcase.singularize}_phones_path",
@phonable_id),
2006 Mar 03
1
rjs isn''t update_page problems
i have a list of, for example, meal_names. Basically, I can submit a name
and the name I add shows up in the list.I had this working wehn i created an
actual add.rjs template for it. So feeling good about my self, I attempted
to move it all to the controller and use some update_page goodness. Now it
the ajax middle doesn''t happen. I don''t get any errors but the list