Displaying 20 results from an estimated 10000 matches similar to: "Extending the onclick properties with link_to ?"
2008 Feb 19
1
adding an onclick option to link_to method
Hello,
I''m trying to use the rail link_to to open a popup window and then
print the popup window at the same time. Is there a way to add
another "onclick" option to tell the popup to print? I know how to do
this in javascript but not sure how to use the rails help to do it. I
also am aware that the link_to_function method is used to call a
javascript function.
2008 Oct 31
6
link_to submit form value 2
Hi to all,
I''d like to pass with a link to values inside some form. I''ve read in
other posts that it''s possible if i include the forms inside a html
<div>...
So here it''s my code of the view :
<div id="study">
<table>
<tr><td><label for="study_titolo">Titolo di
2006 Jan 26
2
javascript in link_to?
having trouble finding how to include a random chunk of javascript (an
onclick event handler) in a link_to generated link.
at first i thought i could use the html_options field, but if i understand
correctly, that only supports :confirm, :popup, and :post options.
hope i''m wrong. anyone know different?
john
_______________________________________________
John McGrath
2007 Mar 28
5
link_to best practice
I''m looking for best practice for creating a hyperlink which has both an
icon and text.
I am currently using this in my view:
<%= link_to image_tag(''icons/add.png'', { :align => ''absmiddle'', :border
=> 0, :size => ''16x16'', :alt => ''New education record'', :title => ''New
education
2006 May 09
1
Reusing a model to form and link_to.
Hy guys,
Inside my app I have a form which contains user information.
Sometimes a have a form with a text_field as above:
<%= form_remote_tag(:html => { :action => url_for(:controller =>
"my_controller", :action => "my_action") }) %>
<%= text_field(''my_object'', ''my_parameter'', :maxlength =>
2006 Jan 22
6
Destructive behavior with link_to, button_to, :post=>true
Hello-
I would like to know what the suggested practice is for having multiple
submit buttons on a relatively complicated input page.
Let''s use the example of a Contact. There is lots of info there,
including name, address, phone number. There is also a list of "contact
associations" which can be modified on the same page.
Ideally, the user could have one
2005 Dec 30
2
Radiobutton onclick
Hi,
I would like to make a simple html which displays the contents of a
table from a database. So I put radiobuttons near the titles of the
columns to note and do a sorting by that column. But I don''t know how
to implement that the clicking on one of the radiobuttons make the
sorting. The problem is the view part. How to give a radiobutton to
make some action on a click by the helper?
2006 Apr 19
2
how to pass a hash as a parameter in link_to_remote
When using link_to_remote, I''d like to pass along some auxiliary data in
the request. It''s a hash of dynamic data that can change with each
request.
But I get an error when rails trying to "stringify" the hash.
For the regular link_to, it works because it turns the hash into a
regular GET-like query string.
I''m expecting to be able to get my hash as
2009 Jul 07
10
link_to, how do you combine url options and html_options?
I have a link-to that I wish to look somewhat like this:
link_to "link here", new_object_path,
:method => :post, :confirm => ''Press OK'', #url
options
:class => "css_class", :id => "css_id" #html
options
In any case I can either get the url_for options to work or the html
options to work, but
2006 May 26
2
link_to and fragment identifiers
Fragment identifiers, it took me 30 minutes just to figure out what
they are called.
I would like to be able to create url that looks like this:
post/view/id#comments
How do I do that with a link_to function?
link_to "Comments", :controller => "post", :action => "view", :id =>
post.id ???
Thanks guys! :-)
John Kopanas
http://www.kopanas.com
2007 Jul 31
2
link_to
Im trying to use the link_to helper to open a blank window which is
basically just a framed window to display user info without all the
extra distractions that come along with opening this window. Here is
what I got:
<%= link_to ''Airline Preferences'', {:action => ''airline_preferences'',
:id => @user.id, :method => ''post'' }, :target
2006 Aug 04
3
<img onclick> vs link_to_remote()
In one of my view , I have an image the user need to click to close a
<div>selections</div> added by an Ajax call.
if I use :
<img src ="/images/icon_closeitem.gif", size="16*16",
border="0",alt="Close Selection", title="Close", onclick="<%=
remote_function(:url => { :controller => ''property'',
2006 Jun 04
3
Ajax table does not update
I have two models: Child and Day. A Child has many days, and a day
belongs to a child.
I want to create ana ajax table listing the children and, after pressing
a button, I want to show the days that belong to that child.
Here is my code:
(list.rhtml)
<table>
<tr>
...
<td><%= link_to ''Days'', :action => ''show_days'', :id =>
2006 Aug 17
2
link_to_remote question
I''m using link_to_remote to call a method that deletes an item
<%= link_to_remote " [delete]", :url => { :controller => ''user_admin'',
:action => ''employee_type_delete'',
:id => employee_type.id
}
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
2006 Apr 24
2
link_to external link
I have searched through the api several times through and can''t seem to
find this.
<%= link_to ''Help'',
{:url => ''https://www.example.com/page?AppServeHelp''},
{:target => "_new"} %>
but this doesn''t work as it still prepends the current server/controller
space on the url itself.
How do I accomplish this?
Thanks
Craig
2006 May 18
2
How to add hint to link_to_remote?
To add a hint to normal link is very easy:
link_to ''design'', {:action => ''design'', :id => survey}, :title =>
''Design the survey''
but, after trying several times, I still can''t figure out how to do the
same to link_to_remote. I''ve tried put :html => {:title => ''blah''}. It
doesn''t
2006 Apr 04
7
Not getting the whole RJS-based partial rendering concept ...
I have been trying all kinds of different ways to produce what I think
should be a simple effect, but have not had any luck yet and apparently
I am not following the general idea...
What I am trying to accomplish is the following (part 1 works and part 2
does not):
1. One of my views has a link_to_remote which updates a div container
with a table of data
my example is
<div
2006 Apr 04
2
How to add CSS tips to link_to_remote?
The following code of tag clouds implementation:
<%= link_to(h("<#{tag}>"), "tags/listmytag/#{tag}", { :style =>
"font-size: #{font_size}" } ) -%>
I want to change it to ajax style:
<%= link_to_remote "<#{tag}>",
{ :url => { :controller => ''tags'', :action => ''listmytag'', :id =>
2006 Jan 17
2
link_to_remote() - can I post data with it???
can I post data with link_to_remote(),
link_to() has special option :post => true and viola
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060117/2a0a00af/attachment.html