Displaying 20 results from an estimated 1000 matches similar to: "Passing a hidden field to insert_html"
2007 May 07
0
page.insert_html
Hi everyone,
In one of the actions i am using page.insert_html, t works fine in IE7
and Mozila. Is does not seem to work in IE6. Anyone aware of such
problems... i''m stuck... any help is appreciated; the element i am
inserting into is a <td>
page.insert_html :after, ''company''+params[:id].to_s, :partial
=>"group", :id => params[:id]
and the aprtia
2006 Jun 07
0
using inline insert_html to generate uniquely named elements
Hello all,
I?m using some inline rjs to add content with a unique id like so:
In the <head>:
function add_fields() {
html = ''<div id="'' + new Date().getTime() + ''">'';
html += "<%= escape_javascript(render :partial => ''field_set'')
-%></div>";
new Insertion.After("whatever", html);
}
In
2006 May 28
1
RJS template / page.insert_html problem
Hiall,
I have a rjs template which is calling page[:xxx].replace_html ... a
couple of times and this works perfectly. However, in the same rjs
file I have two calls to page.insert_html, which do not work. No error
in development.log, nor error message in browser, the new content for
the div simply isn''t changed at all.
This is my code:
...
action = "save_" +
2006 Jul 26
3
insert_html inserting fragment twice
Has anyone had trouble with inline RJS insert_html with the latest
version of Rails?
My problem is that insert_html inserts the html fragment twice. For
example,
render :update do |page|
page.insert_html :top, "some_list", "<li>booyow</li>"
end
would render "<li>booyow</li>" twice.
Thanks.
--
Posted via
2006 Mar 22
1
page.insert_html and the :text argument
Hi,
I''ve got a problem with .rjs templates. When I do
page.insert_html :bottom, ''stylist_tablebox'', :text => "what ever"
This is what I get:
new Insertion.Bottom(''stylist_tablebox'', null);
I tried this on Edge rails revision 3860 in an inline rjs update.
Thanks in advance,
Frederik
2006 Apr 05
2
RJS and remote forms
I''ve run into what I think is a browser bug related to using
remote_forms pushed in an RJS update.
In my controller, I have an action that creates a new model and returns
a form for one of its children:
def create_party
party = Party.create
render :update do |page|
page.insert_html :top, ''party-list'', :partial => ''party_header'',
2006 Jul 05
0
Javascript repeating fields.
The one area I keep hitting my head against in Rails is repeating fields via
javascript. I frequently have forms where one or more fields are actually
broken out into sub tables because there can be multiple simultaneous values.
Rails seems to want to you to use the [] construct in the form helpers (e.g.
text_field(''employee[]'', ''name'')), but I can''t
2007 Sep 10
2
syntax II
Hi
Given the warm response to the syntax additions in 1.9.1 I''m considering
moving one or two more syntax extensions into core, and would like your
thoughts. Last ones, I promise. Realise we don''t want much more API
change now, but also we''ll probably also have to live with whatever we
settle on for 2.0 for a little while, so...
1) Setting up event handlers
In
2007 Dec 06
0
Stange behaviour with internet explorer
Hi!
I''m developing an application with Rails 1.2.6 and I''ve facing a weird
problem.
In a form, I''m using link_to_function that is aggregating a :partial,
the code is as follows:
<table>
<thead>
<tr>
<th>Marca</th>
<th>Porcentaje</th>
<th>Objetivo Mensual</th>
2012 Jan 10
2
plug leaks in febootstrap
Hi Rich,
I ran coverity against febootstrap's head and it spotted four leaks.
This fixes them. The first patch plugs three.
The second attempts to make the add_link function do what I'm
guessing it was intended to do. As is, it was a no-op.
>From 7c2ff55613598a1295e213cef36600ad61da7ed6 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Tue, 10 Jan 2012
2009 Mar 07
0
RJS: pass javascript variables in ruby calls
Hey,
I have this link_to_function which takes an RJS block as follows:
page.insert_html :bottom, :documents,
:partial => "upload_fields",
:locals => { :doc => Document.new, :index => ''UNIQUE_ID'' }
It adds a partial to a div. I need index to be a unique id, but can''t
generate one.
I have an actual javascript function next_index() that will
2009 Aug 07
2
calling a jQuery function from RJS/onclick
Hi,
I have the following jQuery function on the head of my page.
<script type="text/javascript">
jQuery.noConflict();
/* calling jNice on document ready */
jQuery(document).ready(function($)
{
$(''div.jNice'').jNice();
});
.....
</script>
On page load, this gets called correctly.
Now there''s a link on the page that lets me add more
2006 Jun 21
2
Using RJS to highlight one LI if using insert_html on an UL?
It seems common to use RJS for quickly adding and highlighting a list
that is having content added to it like this:
http://rafb.net/paste/results/Z3m32g48.html
... where "my_list" would be an UL and the partial would insert a LI.
Given that example, is there an easy way to highlight only the newly
inserted LI instead of the whole UL? The only way I can see to do it is
to give
2006 May 13
2
Using RJS in views without ajax
Hi!
I can use RJS in views like this (without using ajax):
<%=link_to_function("switch fields",
update_page do |page|
page.insert_html :before, ''date'', date_select(''exhibition'', ''date'')
page.remove ''date''
end) %>
Is there a way to move this RJS code into a function to separate file?
.js files are not parsed
2009 Jun 29
0
Problem with 2.3 nested forms and new elements
Hi,
I''m using the new nested forms functionality and I having problems with
new created elements.
I have an invoice with lines. I would like to be able to create a new
invoice, in the same form insert new lines dinamically and saving the
invoice and the lines when everything is validated, not before.
The problem is that when I add a line dinamically to the form, the new
line created
2007 Dec 20
3
How-to spec this helper method?...
Hey gang,
I have this dead-simple method defined in a helper:
def add_category_link(name)
link_to_function name do |page|
page.insert_html :bottom, :categories, :partial =>
''category'', :object => Category.new
end
end
Where, and mostly how, would I spec this? I haven''t been able to find
how to stub the rjs in a helper spec, so
2010 Apr 12
3
$(link).previous("input[type=hidden]") is undefined
I am getting this error when trying to use the remove link explained
in the Railscast:
http://railscasts.com/episodes/197-nested-model-form-part-2
error:
$(link).previous("input[type=hidden]") is undefined
remove_fields()applic...1065175 (line 6)
function onclick(event) { remove_fields(this); return false; }()1
(line 2)
[Break on this error]
2002 Jul 25
1
Need Help -
Hi.
I have a very serious problem. sometimes I view messages like that:
[2002/07/23 14:09:00, 0] lib/doscalls.c:dos_GetWd(420)
Very strange, couldn't stat "." path=/root
and I have one win98 client that when he goes to open a share file from
him, samba asks him for the password
I have Linux Red Hat 6.2
Snmp Kernel
Samba 2.0.10
1 Gb RAM
4 disks in RAID 5
Any ideas?
Thanks in
2015 Feb 11
0
Fwd: samba & Oracle ACFS Issues
Hi Volker and the list
Yesterday the problem appeared again
I could launch a strace command over a samba PID to see what was going on
and this is the result
[PRO] [root at pf3il0024 ~]# strace -frp 57686
Process 57686 attached - interrupt to quit
0.000000 fcntl(14, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET,
start=35824, len=1}
It seems the process was trying to get a read-lock but no one
2016 Apr 15
2
Strange behaviour with ptmx file descriptors
Hi Angel and many thanks for your answer
The application still sending & receiving data
.- strace over the application:
write(1, "\33[1;1H\237#SF \234", 44) = 44
<--it was sent from the application to the terminal, but ssh didn't
received this string
read(0, "\10", 1024) = 1 <- the client remained sending data and
it