similar to: stumped trying to escape javascript

Displaying 20 results from an estimated 20000 matches similar to: "stumped trying to escape javascript"

2008 Jul 10
0
JavaScript Form Submit with form_remote_tag
I am trying to submit a form_remote_tag using javascript instead of a regular form submit button. Here is my code: <%= form_remote_tag( :url=> { :controller=>''store'', :action=>''add_to_cart_ajax'', :id => @product.id, :variation => @variations[i].id }, :html => {:name => ''add_product_form''}, :complete =>
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 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 <<
2009 Mar 30
0
Trying to bind an appended partial that has REST_in_place attached to it with jquery?
In my create.js.erb view I am creating a new model in the view. On creation I want to have the appended partial in the dom and selectable so I can click it''s name and run the plugin REST in place with Jquery. #create.js.erb $("#new_show").before(''<div id="flash_notice"><%= escape_javascript (flash.delete(:notice)) %></div>'');
1999 Oct 10
2
Well, I'm stumped
I'm getting some sort of weird distortion in the sound being output. I've tried many variations (including copying the seeming working code straight out of decoder_example.c) and still it comes out distorted. It is a different type of distortion from choppiness (which it also has). The easiest way to hear it is to pause play for about ten seconds and then resume. xmms will continue to
1999 Mar 07
0
coplot has me stumped
I'm having trouble with coplot. I have two conditioning variables, and when I try to specify two sets of given.values, no matter what I do I get the message, Error: Object "b.levels" not found. Here is the section of code: c.ranges <- co.intervals(schses, number=4, overlap=0) a.ranges <- co.intervals(as.factor(aa94), number=2, overlap=0) PredAA <- as.factor(aa94)
2009 Sep 04
2
escape_javascript error
Hello, I am using jQuery for all ajax stuff and recently got following error: ActionView::TemplateError (private method `gsub'' called for #<Array: 0x2425ae8>) on line #1 of... and the code where it happens: $("#notice_ajax").before(''<div id="notice_ajax"><%= escape_javascript (flash.delete(:notice)) %></div>'').remove();
2004 Jul 16
4
Stumped on methods
I have been trying to write a "proper" print method for a package, and have almost gotten what I want. From a reading of the relevant section in R Extensions and the introduction to methods, I've stuck the whole business into a character object and used: NextMethod("print") However, instead of not printing quotes and displaying the usual representation of the string,
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 Jun 05
1
Unobtrusive javascript...what if?
What if...you could produce accessible, unobtrusive javascript, using Rails built-in javascript/prototype helpers, with just one extra line of code in your layout, a plugin, and one small enhancement to the helpers. Something like this: [php] <% form_remote_tag :controller => ''foo'', :action => ''bar'', :unobtrusive => true %> # which produces
2006 Mar 13
2
Prototype ajax/javascript q
I''m trying to send to my application the coords x,y on an "input type image" in a html form, but x,y variables are not present in the POST_DATA (are not submitted). Any other field (hidden inputs) are being sent when I click on the image input form field. I use rails 1.0 and prototype 1.4, browsers Seamonkey 2.0, Firefox 1.x and Konqueror, Linux, and I''m just a
2006 Jan 14
14
Javascript/AJAX Debugging
Hello ! I''m trying to implement something similar to the "multiple updates" section of the Web2.0 chapter of the Agile book. I implemented my version, and nothing is happening. No javascript errors, my logs look fine, page is rendered fine... just no Effect.Highlight. Here is the code: views/causes/cause_home/index.rhtml =============== <%= form_remote_tag(:complete =>
2006 Jun 20
1
DAO 3.5 and OLEAUT32.DLL troubles...
Hi, I'm a Delphi developer. Using DAO 3.5 (the engine for MS Access 97 databases) and Wine 0.9.15 or 0.9.9 I've got a trouble: when I launch a query that uses some expressions (ie: "SELECT Format(...) FROM Customers") the query fails, lamenting that the function doesn't exist... (A note that can help: Dao uses VBAR332.DLL or Expsrv.dll module to evaluate expressions) The
2011 Jun 08
1
Problem with escape_javascript in 3.0.9rc1
Specifically, this does not work! $("#lightbox_content").html(''<%= escape_javascript(render(:partial => "form")) %>''); Is this the correct way to do JQuery html replacement using a partial? This works fine in 3.0.7. Tony -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to
2012 Feb 17
0
Passing a value to js.erb
Rails 3.1.3 I''m trying to pass a value to ''save.js.erb'' . in the view, I have put <%= hidden_field_tag "video-id", @video.id, { :id => "video-id" } %> then, I can retrieve it by var idval = $(''#video-id'').val(); It certainly gets the value. The problem is then I need to pass it to the following. I tried,
2010 Dec 21
8
Rails - escape_javascript without all the \n\n\n\n\n
Hello, I''m using escape_javascript to return a partial to the browser via ajax. Something like: $("#inject").html("<%=escape_javascript(render :partial =>"feed/ index")%>"); Problem is escape_javascript ends up outputing all kinds of wasted space like \n\n\n\n\n \n Is there anyway in Rails to escape_javascript more
2007 Mar 02
1
What characters do you have to ''\'' escape in exec?
I''m stumped. I''m just trying to do something like: if [ `command a` -eq 0 ] || [ `command b` -eq 0]; then <do stuff>; fi And I just can''t seem to make it work. Thanks, Trevor _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
2005 Dec 15
2
field update not happneing
Hi, I''m having some scriptaculous weirdness, hoping this is an easy fix. I have a js function defined in my header: function flash(msg){ $(''flash_msg'').value = msg; alert(msg); // for debugging ... } This is being called like so: <%= form_remote_tag( :update => ''admins'', :url => { :action =>
2011 Sep 10
4
Finding HTML attributes with jQuery in Rails 3.1
I''m having trouble wrapping my head around the proper syntax to have jQuery (in an .js file) grab an HTML attribute and use the value of that attribute to load a partial. HTML fragment: <a href="/toggle" data-remote="true" section="training"> jQuery string (now setting a static partial, I need this to be dynamic)
2011 Sep 27
1
Rails 3.1 assets path for video player Flash script 'player.swf'
I was using a Flash video player within a previous Rails version app Moving to Rails 3.1.0 , I dob''t know where I should put the script ... I tried to move it into an app asset sub-directory assets - jwplayer - - player.swf but this raises an error "NetworkError: 406 Not Acceptable - http://localhost:3000/assets/jwplayer/player.swf" player.swf the flash script is given as a