Displaying 20 results from an estimated 6000 matches similar to: "RJS in_place_editor Error"
2006 Sep 06
2
RJS Javascript oddity - trying to call Element.setStyle
Hi all,
I have a really simple web page. Right now, it''s just a button and a square
div. What I want to do is to change the background color of the div to red
when the button is clicked. My form code looks like this:
<%= form_remote_tag :url => {:action => ''color_show''} %>
color_show.rjs looks like this:
page <<
2007 Apr 04
2
Simple RJS Calls Not Working
I have a simlple view:
<h2>Tags</h2>
<% unless @recipe.tags.empty? %>
<table>
<tbody id="tags">
<%= render :partial=>''tags/tag'', :collection=>@recipe.tags %>
</tbody>
</table>
<% end %>
<% form_remote_tag :url=>tags_path(@recipe) do%>
2006 Jun 27
5
RJS -- What am I missing?
This is driving me nuts:-)
I''ve brought it down to a simplified case where I''m rendering this rjs
template:
page.insert_html :top, ''cat1'', "<li>Some list item</li>"
According to FireBug, this is what I''m actually getting in the browser:
try {
new Insertion.Top("cat1", "<li>Some list
2006 Aug 06
1
RJS error
http://pastie.caboo.se/7437
Page appears as:
Todo List
#testing
* Heres another Edit Destroy
* Testes Edit Destroy
* One more Edit Destroy
* Heres another Edit Destroy
* And another Edit Destroy
NameError in TodosController#create
undefined local variable or method `page'' for
#<TodosController:0x228bf4c>
RAILS_ROOT:
2006 Jun 24
6
Ajax fade effect
I have a list of categories, when I delete one of them, I want that item
to fade and then get removed. So I do the following:
1. home_controller:
def delete
@category = Category.find_by_name(params[:name])
@element_id = @category.name
Category.delete_all(["name = ?", @category.name])
end
2. delete.rjs:
if @element_id
page.visual_effect :fade, @element_id
2006 May 17
4
.rjs templates undesiered output problem
Hello everyone, I am working with rjs templates in rails, and I''m amazed
of how simple it is to generate code with ajax, however I''am having some
troubles and I can''t seem to find a way to solve''em.
Whenever I put some code in the template, let''s say:
page.visual_effect :highlight, ''sitio37'', :duration => 3
I get the
2006 Jul 06
7
form_remote_tag submitting to an rjs file.
I have the following form that I am trying to use, but for some reason,
the form gets submitted with out the params values.
<%= form_remote_tag(:url => { :action => :add_item_to_order }) %>
<tr>
<td>
<%=collection_select(:order_item , :item_category_id,
@item_categories, :id, :name)%>
</td>
<td>
<%= text_field
2006 Mar 18
9
RJS - not working in IE
I searched thru all the postings about RJS, and I didn''t find one person
who complained of problems specific to IE, but that''s what I''ve got.
My environment is:
Rails 1.0 + RJS Plugin
Updated Javascripts to Scriptaculous 1.5.3 (for evalScripts support)
Monkeypatched in_place_editor to support evalScripts
I have just started using RJS, and I have two .rjs templates.
2006 Aug 30
10
respond_to not detecting JS turned on. form_to_remote problem?
I''m trying to use respond_to to redirect visitors who have JS turned off to a different page. The problem I''m having is that respond_to is sending *everybody* there. It''s not recognizing that JS is turned on in the browser. The wanted_html.rhtml file below is rendered whether I''ve got JS turned on or off. I''ve looked at the Accept headers being sent
2006 Jan 30
5
a RJS problem/patch
Hi,
add_rjs_to_action_view.rb of javascript_generator_templates
doesn''t work with setting Content-Type in a controller.
(e.g.) http://wiki.rubyonrails.org/rails/pages/HowtoSetDefaultEncoding
class ApplicationController < ActionController::Base
before_filter :set_charset
def set_charset
@headers["Content-Type"] = "text/html; charset=utf-8"
end
end
I
2006 May 25
2
page.replace_html
This is odd.
When I call: page.replace_html ''formdiv'', :partial => ''listing'' from an
rjs file it renders stuff like:
\n
\n
\n
test
\n
\n test , NY 12344
\n
\n
Phone: (999)999-8888
\n\t\t\n\n
\n \t\n \t\thttp:// \n \t\n
\n
\n \n"); } catch (e) { alert(''RJS error:\n\n'' + e.toString());
2005 Dec 23
13
how to form.rest in RJS
is there any way to Form.reset (clear all fields of the form ) in
form_remote_tag generated form?
I want to reset fields after ''submit'' in .rjs.
--
Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org>
2007 May 15
5
Problem with RJS and/or Prototype.js =>ResponseText is blank
Hi, I''ve got a real head-scratcher. I''ve got a standard Ajax form using
form_remote_tag, which calls a controller action which adds a comment
and then sends back some JS via RJS which updates a few items on the
page.
It did work fine but (and I''ve no idea what has happened) now it
doesn''t. It calls the controller action but gets an empty response back
and
2006 Nov 04
1
Dynamically updating a sortable list using RJS
I''ve got the following sortable list in one of my views:
<ul id="sortable_list" class="sortable_list">
<%= render(:partial => ''section'', :collection => @sections) %>
</ul>
<div class="new_section" id="new_section">
<%= form_remote_tag(:url => {:action =>
2006 Mar 31
5
RoR 1.1 RJS problem
I''ve been playing with the new RJS stuff in RoR1.1, and I have to say
that I''m am extremely impressed, NICE! work guys. However, I seem to be
having a bit of a problem. I promise, I''ve googled the hell out of it
and haven''t found an answer.
Set up: Putting together a little proof of concept app. Display a form
(index.rhtml) that just has a button to
2006 May 16
7
RJS head scratcher
I''ve been joyfully using RJS in a lot of our work lately, with no issues
whatsoever. However, I am porting an application to RJS templates that
we''ve had for a while, and having some issues.
When I use Firebug to see what is going on, the response comes back like
this:
try {
new Effect.Highlight("gi_error_row",{duration:20});
} catch (e) { alert(''RJS
2006 Apr 10
2
RJS newbie - need help with iterating / existence test
Greetings!
I''m new to Ajax and am trying to get a basic app working as a vehicle for learning it. The app is an extension of the cookbook tutorial. My intent is to be able to add a list of ingredients for a recipe. The page to add ingredients uses Ajax. As ingredients are added to the page they''re displayed in a "green-bar" format like that used in the Depot
2006 Jul 20
6
replace_html + javascript
Hi all,
This is my first post to the list, so I hope it gets through and I
don''t do anything wrong :)
Here''s the issue I''m having...
I have an rjs that''s doing:
page.replace_html ''myid'', :partial => ''my_partial''
And in my my_partial I have:
<script type="text/javascript">
2006 Jun 13
5
strange RJS behavior
I used RJS extensively in my last web app with no problem.
I''m just beginning a new one and having a very odd problem.
The called method, get_names, retrieves some values from the database,
then ends:
render :layout => false
the get_names.rjs file is rendered into Javascript, but then is just
dumped as Javascript (text) into the browser:
e.g:
try {
2006 Apr 07
3
RJS removing content of div, but not div itself
Hi,
I''m creating a list of ingredients on a page. When the user clicks the ''Add Ingredient'' button a record gets added to the db and the ingredient gets added to the page. On the page, each record is represented by a <div> with three <span>s inside. One of the <span>s has a link_to_remote to ''delete'' the ingredient. When the link