Displaying 20 results from an estimated 10000 matches similar to: "AJAX request not setting Accept header"
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 Apr 07
3
Ajax render a template
In my blog a user can add comments. I want an Ajax call to add the
comment to the bottom of the comments list.
How to i return a comment thats is in the comment template and add it to
the bottom of the page. I have gotten as far as rendering some text
back to the form and the comment doesn''t display until i refresh.
This is my _newcomment.rhtml form to create a new comment
<div
2006 Jun 28
2
respond_to and Accept headers
After reading:
<http://www.loudthinking.com/arc/000572.html>
I''m trying to experiment with respond_to in order to not repeat myself
and create atom feeds out of a "browse" view.
In application controller I created a before filter that checks for the
extension of the current url and changes the accept header:
[code]
def check_headers
@headers["Accept"]
2006 Jul 26
7
syntax for specifying :html fallback on form_remote_tag
Has anyone gotten the :html option for specifying a ''fallback'' action if javascript''s not enabled working on form_remote_tag (or remote_form_for)? I can''t figure out how to specify the action that''s supposed to be invoked if js _is_ enabled.
Or maybe I''m just misunderstanding how this thing is supposed to work. I was assuming
2008 Sep 03
2
Highlighint rjs problem on a new product
Hi,
Problem Summary:
I have been trying to add the highlight effect to my table but
everytime a new record is added the highlighting gives an rjs error.
However when i click the add to cart button on a product that already
exists inside the table, the highlight effect works. Is this because
the partial must only have only one <tr></tr> in it and the <table>
must be on the other
2006 Apr 16
2
AJAX update of <img> element?
Hi,
I''ve been trying to do AJAX updates of an <img> element, but I can''t seem to make it work.
Should it be possible to do something like this...?
[View]
<%= form_remote_tag :url => {:action => ''sendplot''}, :update => ''plot'' %>
<%= submit_tag %>
<%= end_form_tag %>
<img id="plot"
2013 May 27
6
Headache with Ajax in Rails using jQuery
Hello everyone, I''m a newbie at Ruby on Rails. I spent nearly two days
of the Memorial Day weekend stumbling upon making Ajax working in Rails.
At this point, I''m so exhausted and hope that I can get some help to
move forward. I have tried nearly everything I found on Google but
still not successful. Initially, I tried the Ajax approach offered by
Rails but did not work, so I
2006 Apr 14
2
Nested AJAX remote_form in form?
I''d like to achieve something that is better described by the following
code:
<%= start_form_tag :action => ''create'' %>
<%= text_area ''place'', ''description'', :cols => 100, :rows => 4 %>
<div id="categories">
<%= form_remote_tag :update => ''categories'',
2007 Sep 10
2
form_remote_tag not providing params in Ajax
I''m new to Ruby, Rails and Ajax and I''m trying to do something
seemingly simple. I am trying to use a value someone supplies in a
form in another form that is dynamically generated using Ajax.
I have the following code:
<div id="race_table">
</div>
<%= form_remote_tag(:update => "race_table", :url => { :action =>
2006 Feb 02
1
What''s the javascript to submit an AJAX Form?
HI Everyone,
How do I form the href on an anchor so I can create a link-style submit for
an ajax form?
In this snippet, the INPUT generated by #submit_tag works OK, but the anchor
results in the AJAX replacing the whole page?
Can I make the anchor/href submit the AJAX form as well?
Thank you!
I have this (list.rhtml):
<%= form_remote_tag :url =>
2006 Jul 21
0
Ajax page.replace_html model validation errors
I have the following setup:
A model: that validates using helpers like: validates_presence_of, etc..
A view: called ''new'' which renders a partial
The partial: _form which has error_messages_for and a
form_remote_tag , submit_tag and end_form_tag
An action ''create'': that gets executed via the submit_tag in the
_form and which
in case it can''t
2006 Jul 24
0
Ajax page.replace_html model validation render partial errors
Hi; I have the following setup:
A model: that validates using helpers like: validates_presence_of, etc..
A view: called ''new'' which renders a partial
The partial: _form which has error_messages_for and a
form_remote_tag , submit_tag and end_form_tag
An action ''create'': that gets executed via the submit_tag in the
_form and which
in case it can''t
2007 Mar 23
11
Is there such a thing as button_to_remote?
I''ve changed my destructive link_to statements in favor of button_to.
But what if I want to make an .rjs call with that button?
Seems like we need something equivalent to link_to_remote, so that the
button can make an ajax request instead submitting the form.
Or am I missing the point entirely?
Jeff
--~--~---------~--~----~------------~-------~--~----~
You received this message
2006 Jun 15
2
AJAX form inside table - error
Hello,
I need to put an AJAX, form such that it is inside a table, and spans across
few rows.
But, what I am noticing is that, while submitting the form, the data in the
fields is not submitted.
If I move the form outside the table or inside a cell, things work OK, but not
when the form is inside the table and spans few rows. This problem is only
with AJAX forms, regular forms work perfect. I
2012 Nov 29
2
[Rails 3.2] form_tag w :remote => true doesn't fire up the js format
I have a form_tag written like this :
= form_tag search_backoffice_places_path, {:remote =>"true", :id =>
:searchplaceForm } do
.. input fields
= submit_tag t(:search)
generated html is correct :
<form accept-charset="UTF-8" action="/en/backoffice/places/search"
data-remote="true" id="searchplaceForm" method="post">
...
2006 Feb 26
0
Ajax, MemoryStore and sessions
Have you ever worked with Ajax, memoryStore and sessions in Rails?
I''m trying to pass a value through a session variable to various methods.
I''m calling the methods with Ajax on a submit button. I do this twice on a
page. The first time I pass a variable from the page to the controller and
store it in the session and write a log entry. This works fine. When the
second button
2005 Dec 21
3
How to make a drop-down automatically submit an AJAX form
Hi,
I know that to make a dropdown box automatically submit when you change
the value, you do this:
<select ..... onchange="this.form.submit();">
BUT i''ve got an ajax form, and if i do the above trick, it simply
reloads the ajax partial into the whole screen, rather than into the div
where it is meant to go.
I''ve already got it all working so that if you click
2007 May 29
0
Ajax sortable_element refresh
Hi,
I have the following ajax example, with a list of counters, and two
buttons for adding/removing elements. The list is sortable.
There are two things that I don''t know how to do:
. remove an elemet
. when I add a new element to the list, that element doesn''t become
sortable with the rest of the list
Thanks,
hugo
#### View
<html>
<head>
<title>Ajax
2006 Apr 27
1
Ajax response won''t display
I''m hopeful that this is something simple i''m missing, but I''ve run out of
things to try. It should work just like the example in Agile Web
Development with Rails (i think)
I send an ajax request using remote_form and it''s processing correctly on
the server and returning a new form, but it won''t replace the original.
It''s supposed to update a
2007 Feb 08
3
testing ajax responder actions
I have an Ajax responder method which uses respond_to to make sure it
only works with Ajax. I''m having trouble figuring out how to call this
action successfully. I''m using Rails 1.2.x. Any thoughts?
--
Cheers,
Kevin Williams
http://www.almostserio.us/
"Any sufficiently advanced technology is indistinguishable from
Magic." - Arthur C. Clarke