Displaying 20 results from an estimated 50000 matches similar to: "Re: AJAX and select"
2010 Jun 02
1
Ajax with JQuery
I have used Ajax link and live validation in index.rhtml
Ajax link requires JavaScript "prototype" and live validation requires
"jquery".
i got "element.dispatchEvent is not a function" on the firebug console
when i used "prototype" and "jquery" in same page index.rhtml
after i removed javascript "prototype" library, i got "Ajax is
2010 Apr 09
2
dynamically linking to ajax.googleapis jquery
Hi
I am using jquery and jqueryui in my application And in layout I use
<%= javascript_include_tag
"http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"%>
<%= javascript_include_tag
"http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" %>
<%= stylesheet_link_tag
2011 Jul 27
20
Rails, jquery and Ajax
How do I make an ajax call and then update a div with a partial? I''ve
tried this but it''s not working. Comment is created but the partial is
not loaded.
//view
<a href="#" id="testlink">Testlink</a>
<div id="commentlist">
</div>
//controller
def new
@comment = Comment.new
@comment.save
2011 Sep 25
0
ajax problem when switching from prototype to jquery
I have an old Rails application that I''d previously upgraded to Rails 3.1
with a lot of legacy features left on; now I want to switch to using jQuery
instead of Prototype, and switch to using the asset pipeline.
I''m trying to tackle the first of those; no idea if that''s wise, maybe I
should start with the asset pipeline instead? To switch to jQuery, I added
gem
2010 Nov 06
0
Rails and JQuery and Ajax/Json question
Hi,
I am using JQuery in my rails app. I''ve taken the approach outlined
in Ryan Bates''s Railscast on jquery to do the following:
jQuery.ajaxSetup({
''beforeSend'' : function(xhr) {xhr.setRequestHeader("Accept",
"text/javascript")}
});
to set my ajax call request Headers to text/javascript so that my
respond to block for javascript is
2011 Mar 22
0
Error on ajax forms/links in jQuery UI tabs
I''ve implemented jQuery UI tabs, and I get an error:
When i submit a ajax form or link, it gets submitted multiple times.
As seen in this Doom console output:
DELETE http://localhost:3000/innmeldings/101 404 (Not Found)
DELETE http://localhost:3000/innmeldings/101 404 (Not Found)
DELETE http://localhost:3000/innmeldings/101 404 (Not Found)
DELETE http://localhost:3000/innmeldings/101
2012 Mar 07
1
link_to with :remote=>true works when bound to "click" but not "ajax:beforeSend"
Hi. I am trying to do an ajax link in Rails 3.2.1 and jQuery. I am
loading jquery.js and jquery_ujs.js. In my document ready, if I bind
to the event "click," clicking the link fires an event, but if I click
to ajax:beforeSend, it doesn''t. Nothing happens when you click the
link in JQuery. The event does go to the controller, though.
Works:
$(document).ready(function(){
2010 Jun 28
2
jquery ajax.submit() help
Hi all,
I need some quick help in jquery.
While using jquery ajax.Submit(), we can specify the target div to be
modified with the template rendered by the corresponding action.
Is there way using which we can update multiple divs ( using render update)
from the called action in ajax.submit()
I am stuck and for now i am populating a complete page again but its
incorrect.
I need to update
2010 Sep 04
0
CSRF protection not working with jquery ajax post request
Hallo,
I want to test the csrf protection of my application but forgery
protection is not working with jquery ajax request.
I have used Unobtrusive Javascript with jquery
I have removed the
<%= csrf_meta_tag %>
so that my application do not include authenticity token.
In my view I have the following code
$(function () {
$(''#alert'').click(function () {
$.ajax({
2011 Sep 06
8
Ajax and rails 3 UJS (jquery)
Hi, guys,
I''m in the midst of moving an app from rails 2.3.8 to rails 3.0.9.
Sadly, rails 3 no longer has javascript generators and I''m now forced
to do more javascript.
For my project, I have selected jQuery as the javascript framework for
my rails 3.0.9 app.
What I have done to have my app''s deletion link (for each item)
trigger an alert box when the deletion
2011 Sep 07
4
jquery and ajax query in rails 3
hi people
I don''t know much about ajax - jquery. And right now I need to use
some functionality with them.
In a form (sales model) I have the following code:
<div>
<%= f.label :product_id, "Product" %>
<%= f.collection_select( :product_id, Product.all, :id, :name,
options={} ) %>
</div>
<div>
<%= f.label :price,
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
2012 Aug 07
4
how to do render partial on jquery ajax success method with rails 3
I''m using rails 3.2.1 with jquery for an ajax call.
My juqery code is :
jQuery.ajax({
url: "/org_pages",
data: ''org_id=''+ org_id,
type: "POST",
success: function(result){
jQuery("#image_center").html("<%=
escape_javascript(render(:partial =>
2011 May 04
1
Why do I sometimes have to refresh the page manually after an AJAX form submission?
When I do remote form submits through jQuery .submit() why do I
sometimes have to refresh the page manually to see the results?
My jQuery handler is very simple:
$("#vote_yes").click(function() {
$("#approval").val(true)
$(".edit_vote").submit()
});
And the link that leverages this bit of code is as follows:
<%= link_to("Vote
2011 May 25
0
Issues implementing jquery-form plugin for displaying image via an ajax call in my rails poc
Hello all,
I am trying to implement a POC wherein I can post a message + image and
get the same working via AJAX to display them both for each new entry
without the page reloading.
I am using a config of Ruby 1.8.7 and Rails 2.0.2 for project specific
purposes.. I am also using a pretty old paperclip commit from github for
this....I had to suit my proj config requirements mentioned previously..
2011 Sep 14
5
rjs error TypeError: element.getElementsByTagName is not a function in rails 3+jquery
hi,
i am using rails 3.0.10
i am trying with sample application for searching data from table and
updating
my search.html.erb file is
<%= form_for (@employee) do |s|%
<div id ="search_details">
<%= s.text_field :name%>
<%= s.text_field :emp_id, :onfocus =>
''sal(document.getElementById(''employee_name'').value);''%>
2011 Aug 10
3
javascript_include_tag error
<!DOCTYPE html>
<html>
<head>
<title><%= @title %></title>
<%= csrf_meta_tag %>
<%= javascript_include_tag
"http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js",
"jquery.rails.js"
%>
<script type="text/javascript">
...app/views/layouts/application.html.erb:7: syntax error, unexpected
2012 Feb 27
6
selecting params value to use with $.ajax()
Hello all,
I''m trying to write a jquery function where I am posting some data from a
form. I am wondering is there a way to select the particular param that I
want to use when I submit the data to $.ajax(). I don''t believe it makes
sense to create a hidden field just to use with $.ajax() but I can''t seem
to figure out how to get to the params key/value using jquery.
2011 May 04
0
using jquery datepicker within a jquery dialog
so I have datepicker working just fine in a normal window but I cannot
for the life of me get it to work within a dialog.
I have some javascript that opens a dialog in my application.js file
as well as the datepicker js
is as follows:
$(function() {
$("#version_release_date").datepicker({dateFormat: ''yy-mm-dd''});
});
$(document).ready(function() {
2012 Jan 23
0
Ajax confusion
I''m a bit confused about ajax. If I have a link, do I add the href,
data-remote="true" and data-method in there? Or do I make the actual
call in a separate script with $.ajax({})? Or both?
The same thing with a form. Is that suppose to have an action path and
an jquery axaj url: "..." path at the same time?
--
Posted via http://www.ruby-forum.com/.
--
You received