similar to: Re: jQuery.post gets some code but the code isn't evaluated

Displaying 20 results from an estimated 10000 matches similar to: "Re: jQuery.post gets some code but the code isn't evaluated"

2008 Jul 30
1
Re: jQuery.post gets some code but the code isn't evaluated
> jQuery.post("/plans/<%= @plan.id %>/add_learning_objective?name=" + > objective_name) You need to specify the type option as "script" to have it executed. (See the docs for jQuery.ajax(), where it is the dataType option. The "type" option in $.post is passed to $.ajax as the dataType option) Rein --~--~---------~--~----~------------~-------~--~----~
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..
2008 Sep 25
2
jquery, format.js and IE
I''m trying to use jQuery to write all my js unobtrusively, and running into a bit of a problem when triggering the format.js block in IE6 (and possibly IE7). It returns the JSON string no problem, but instead of parsing it, IE6 asks to download the resource as a .js file. So if my url is ''/pictures/1.js'', IE6 will ask to save or run ''1.js'' I did do
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({
2010 Nov 17
1
How to enable div that was hide using JQuery
I Have used Ajax and JQuery link to enable new and close functionality problem scenario: * While using ajax link to open the new content and closing the same using Jquery link its working fine wherein the same does not happen again while we try to open the new content immediately after closing the "New content" * The above said works fine only while we refresh the page How to resolve it
2013 Sep 19
0
CRUD model in a bootstrap modal with jquery, ajax - best practice
Hi, i have an model, which i want to show edit and update in a dialog via ajax. What i do at the moment: To open the Modal and render the partial, i send an ajax request to controller#show with ujs this is the link: <a class="person-dialog" data-remote="true" data-type="script" href="/en/people/32" onclick="return false">Fidel
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() {
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
2009 Feb 23
3
jquery, ajax, and Internet Explorer
I have a code like this that works in all browsers and not IE. That is they send the expected GET request while IE is sending a POST request. I have tested this using IE7 $.ajax({ url: this.href, type: ''get'', dataType: ''script'', success: function(data){ while in the view I have the normal link_to link. How do I fix this issue? -- Posted via
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 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
2013 Jan 16
0
Rails 3.2 jQuery JSONP request not working - Moved Permanently
I am trying to send a POST request ( ''remove_tag_named'' )and getting a simple OK back on success ; it doesn''t work.. the post is correctly sent , but after then it''s looping on sending a GET request to the same url, with the error 301 Moved Permanently I should not be far fro the solution, but I am stuck : In my routes.rb *namespace
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
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);''%>
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 =>
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
2013 May 11
0
Jquery-Datatable-Rails Gem: Error on Update. PUT request automatically converting to a POST request.
Please checkout this link and help me out here. I guess the Gem has a Bug. It is working perfectly for Creating a User but while Editing User information it is giving a routing error: No route matches [POST] "/users/2" Here is the link: http://stackoverflow.com/questions/16501440/jquery-datatables-rails-gem-not-working-for-update-call-converting-put-request -- You received this
2008 Dec 14
0
jQuery post function
If you use jQuery to post data, what is the accepted best practice for passing parameters - by putting a query string in the url, or passing them through the data argument of the function? e.g. $.post(/tasks/3?completed=true;,{ _method: "PUT" },null, "script") OR $.post(/tasks/3;,{ _method: "PUT",completed: true },null, "script") cheers, DAZ
2013 Feb 12
2
Rails parameters get lost because of jQuery link
(Original post: http://stackoverflow.com/questions/14569721/rails-parameters-get-lost-because-of-jquery-link, unfortunately no response) I saw this Railscast ( http://railscasts.com/episodes/240-search-sort-paginate-with-ajax) the other day and wanted to use the techniques for an application of mine. I have a page with elements on it and I want to sort them by values and select them by tags.