Displaying 20 results from an estimated 8000 matches similar to: "RJS and Google Maps API"
2005 Dec 16
1
Composing HTML e-mail with a PDF attachment
Hi, everyone. I''ve been using Rails for a little while now, and am
really, really enjoying the experience.
I''m having the darndest time trying to send e-mail whose contents are in
HTML, and which includes a PDF attachment. Following various
instructions (in the Pragmatic book, as well as at
<http://wiki.rubyonrails.com/rails/pages/HowToSendEmailsWithActionMailer>),
2006 Feb 16
1
Relative paths in Webrick vs. lighttpd
Hi, everyone. I''ve got a development server running Webrick, and a
production server running under lighttpd. The following two lines of
code work just fine in the development server, but bombs out on the
production server with a "file not found" error:
label_base_jpeg = "app/views/price_books/label.jpg"
canvas =
Magick::ImageList.new(label_base_jpeg)
2006 Mar 31
3
RJS templates outputting bloated code?
I''m an RJS newbie. I just did the tutorial at
http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates, and
then used wget to look at the output the RJS template generates. This is
what I got:
try {
new Insertion.Bottom("list", "<li>Fox</li>");
new Effect.Highlight("list",{duration:1});
Element.update("header", "RJS
2006 Apr 22
3
rjs woes, any hints?
I''ve pared my rjs experiment down to what seems a bare minimum. When I click
on my link_to_remote, the rjs executes, returns the correct javascript to
the browser, but it doesn''t update the div I''ve specified. What appears to
be coming back from the controller is:
Element.update("my_form", "hello, rjs");
I''m tearing my hair out.
2006 Feb 19
2
Missing text/html content in production (but not development)
Hi, everyone. I''m getting a production server ready for a site I''m
working on, and I''ve been a bit stumped by a difference between the
development server (running under Webrick) and the production server
(running under lighttpd).
Here''s the scenario: I''m working on a variation of an e-commerce
system. When someone finalizes an order with our
2006 Apr 21
3
rjs in multiple ajax page
Sorry for the long explanation but I''m having trouble integrating rjs into my
form page. Here''s my page:
<div id="posts">
<ul id="post_list"><%= render :partial => ''list_results'', :collection =>
@posts %></ul>
<p><%= link_to_remote(''+'',
:url => {:action =>
2005 Dec 19
1
Preserving fallback with RJS
Hi guys,
I really like RJS. I think they''ll replace partials in alot of
instances. Unfortunately, because they''re automatically used like
.rhtml and .rxml and are hard to specifically specify it makes it
messy to preserve fallbacks when using them. For instance, using
partials instead of rjs, my create method might look like:
def create
post = Post.new(params[:post])
...
2005 Dec 28
1
RJS and :loading
Hi,
I''m a newbie with Ajax and RJS and have one basic question.
When contents in .rjs are exceuted in a Ajax sequence?
.rjs seems a kind of alternate for .rhtml view file, so I guess they are
in action after the controller action completed.
The contents of .rjs file are :complete scenario, right?
if so, can''t I write some on :loading action in .rjs?
like disabling
2006 Jun 16
2
RJS replaces JavaScript?
Hi All,
I am currently devleoping a Rails application and I need to do following as
part of client side operations,
1. HTML Form validations
2. AJAX
I am currently calling Javascript methods from views of my application; I
heard about RJS(Remote Javascripts) templates; are the replacing Javascript
altogether? can I use RJS for HTML Form validations and AJAX?
What I believe is that with RJS
2006 Jan 13
1
Rendering an RJS template within another RJS template
Is there a way to render an RJS template within another?
I''ve put my simplified code below. No errors are generated, but the
partial isn''t rendered. I also tried using render :action =>
''update_actions''
destroy.rjs---
page.visual_effect :fade, comment_container(@object.id.to_s)
# update the number of comments(below is another rjs template)
render :partial
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 Feb 08
3
Using shared RJS templates
I''ve got an action in my application controller that needs to call a
shared RJS template. Typically it''s actually being called by subclasses
of the application controller.
I''ve tried this..
def action
...code..
render :partial => "shared/template"
end
with ''_template.rjs'' existing in the shared folder.
The problem that crops
2006 May 04
1
Ajas Scaffolding and RJS Templates the same thing?
Hey all,
I''m just starting in rails and am working on my first app. I need to do
inline editing for 2-15 rows of data on a page. I found Ajax
Scaffolding here:
http://www.ajaxscaffold.com/
And it is EXACTLY what I want in my app. But I''ve also been trying to
read a bit up on RJS Templates. Are they basically the same things
except RJS is built into rails or is the
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
2006 Apr 01
2
Inline RJS in controller
Inline RJS and Controller
Hi guys,
I really like the idea about inline RJS.
I have about 20 rjs files for this 1 controller.
They are small. Just updating and hiding some div''s.
So to move this into my controller would clean up a lot.
It makes sense because you see in the controller what you do.
Question:
1. Any penalties for doing this?
- size of controller increases
- performance
2009 Jul 12
3
RJS render errors when user clicks away before render completes
We have an issue where we are using RJS templates to render the
results of Ajax calls. Everything works fine so long as the user
waits for the render to occur. However, if the user initiates the
request and the RJS template is still in the process of rendering, but
hasn''t completed, and the user clicks a different link, then we get a
Javascript alert popup "Unexpected Server
2006 Jul 08
1
Ajax, RJS, and Standard Form Errors
Hi all,
I''m trying to take the standard scaffold and add a bit for ajax to it. I
have a two column page with the list on the left and the right side is
reserved for the create/edit actions. On a successful save my rjs executes
and updates the list view on the left and returns the right side to a "home"
page. However, if one of the model validations fail I use rjs ro
2006 Apr 23
3
RJS not sent as text/javascript
I''ve made a couple of other posts about this and finally figured out what was
wrong. For some reason, the RJS response was not being sent with a content
type of "text/javascript" (which it should be, per the dox). The following
line in each controller method that renders RJS makes my app work:
@headers[''Content-Type''] = ''text/javascript''
2005 Dec 25
5
RJS not working?
I''ve been attempting to add a simple rjs ''delete'' method to my
project. However, no matter what I try, it simply doesn''t work. Even
the easy, easy stuff seems broken. (Yes, <%=
javascript_include_tag :defaults %> is being included in the template.)
For example, from:
http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates
VIEW:
<h1
2006 Feb 08
3
RJS templates before, during and after
RJS templates are nifty. They let you put all sorts of fun effects all
over your bland html pages without too much work.
The link_to_remote function also lets you run scripts before, during,
and after an AJAX call is run by using callbacks.
There does not seem to be an equivalent method for running an RJS
template before or during an action. Rendering it at the end is no problem.
One