search for: encodeuricompon

Displaying 20 results from an estimated 46 matches for "encodeuricompon".

2005 Dec 30
4
AJAX Drag and Drop Detecting Drop Coordinates
This one''s kicking me in the *(&#^. All I want to do is create a draggable item and then detect the coordinates where it is dropped. So my first approach was to just use the draggable_element with :revert => false, like so: <%= draggable_element "my_element", :revert => false %> That works great and lets me drag stuff all over the place. In the scriptaculous
2008 Jan 16
0
GET Using encodeURIComponent
In my site I use the GET method in Ajax.Request. The problem is that I make an encodeURIComponent in my personal JavaScript and call other personal method called "f_ajax" that implement the Ajax.Request. Then happens 2 encodeURIComponent with my params. Why the GET method make the encode? Could have an option in Ajax.Request to disable the encodeURIComponent in prototype (toQueryPa...
2005 Oct 04
2
sorting error "Error: item.id has no properties"
...nt = $(element); var sortableOptions = this.options(element); var options = Object.extend({ tag: sortableOptions.tag, only: sortableOptions.only, name: element.id }, arguments[1] || {}); return $A(element.childNodes).collect( function(item) { return (encodeURIComponent(options.name) + "[]=" + encodeURIComponent(item.id.split("_")[1])); <---------error occurs here! }).join("&"); } Any ideas? Thanks, Jamie
2005 Oct 04
3
serialize()
...nt = $(element); var sortableOptions = this.options(element); var options = Object.extend({ tag: sortableOptions.tag, only: sortableOptions.only, name: element.id }, arguments[1] || {}); return $A(element.childNodes).collect( function(item) { return (encodeURIComponent(options.name) + "[]=" + encodeURIComponent(item.id.split("_")[1])); }).join("&"); }
2006 Apr 21
1
how-to pass other values to InPlaceCollectionEditor?
...fied some rows controls.js to line 782 from: ####################### this.editField = this.cached_selectTag; if(this.options.loadTextURL) this.loadExternalText(); this.form.appendChild(this.editField); this.options.callback = function(form, value) { return "value=" + encodeURIComponent(value); } ####################### to: ####################### var extra_param = this.options.extra_param; //a.alonzi this.editField = this.cached_selectTag; if(this.options.loadTextURL) this.loadExternalText(); this.form.appendChild(this.editField); this.options.callbac...
2006 Jan 29
2
field sets and unicode
Hello gentlemen, I''ve forced to such unicode problem: I have: <%= text_field_tag ''search'', nil, :id => ''search'', :size => 10 %> <%= observe_field ''search'', :url => {:controller =>
2007 Apr 20
2
Double URL Encoding of multiple selects (or any array in toQueryParams)
Hello, It seems that if you call form.serialize on a multiple select, and it double url encodes the values... culprit seems to be (v.1.5.0) line 649/650. It calls encodeURIComponent twice. -jeff --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscr...
2006 Apr 24
1
dragdrop.js problems - workaround here
...js - well it seems that someone arbitrarily changed part of my implementation and has broken the functionality with rails: 864 serialize: function(element) { 865 element = $(element); 866 var options = Object.extend(Sortable.options(element), arguments[1] || {}); 867 var name = encodeURIComponent( 868 (arguments[1] && arguments[1].name) ? arguments[1].name : element.id); 869 870 if (options.tree) { 871 return Sortable.tree(element, arguments[1]).children.map ( function (item) { 872 return [name + Sortable._constructIndex(item) + "=" + 873...
2006 Jan 11
9
Prototype & Cookies
Has anyone written any "cookie" class using prototype? Basically, what I am looking for is if there is an easy way to store mutiple cookies in a single cookie using hash or something - easy writing and retrieval (updating the cookie value). For eg - If I had 25 cookies for my domain 5 of the cookies would either get dropped or not be set (as there is a limit of 20 cookies per domain).
2008 Dec 06
9
jQuery Rails Functions
Hi, I was wondering if anybody who used jQuery with rails could help me out. I have a droppable that fires a simple function, shown below: $("#list").droppable({ accept: ".item", hoverClass: ''droppable-hover'', drop: function(ev, ui) { $(this).append("<br>Dropped!"); } }); But how could I get this to fire a Rails funciton in the
2009 Feb 22
8
dynamically changing a form from POST/CREATE to PUT/UPDATE
For the life of me I can''t figure this one out, although I can''t find anyone else who''s attempted to do this, and probably with good reason. Context: blog using AJAX What I''m trying to do: when the user initially saves a blog entry, or when auto-saving, I want subsequent saves to not create a new blog entry Why I can''t just reload the partial: -
2006 Aug 10
0
Ajax In place edit with Struts
...First of all my apologies if this is not a correct place to post it. Please direct me to correct place. I am using scripataculous inplace edit with struts framework. I am having some text with double quotes and single quote. If the user types it normally then in the callback function i am doing encodeURIComponent before doing a post and everything works fine. I have the encoding set to UTF-8. But if the user copy/paste from MS Word then i am having issues. It becomes Weird characters. When I tried this in ROR framework everything worked fine. I dont know how ROR handles the encoding. Please let me kn...
2006 Feb 14
1
Firefox java script error in prototype.js
...avascripts/prototype.js Line: 1280 and the javascript code at prototype: Form.Element = { serialize: function(element) { element = $(element); var method = element.tagName.toLowerCase(); var parameter = Form.Element.Serializers[method](element); if (parameter) { var key = encodeURIComponent(parameter[0]); if (key.length == 0) return; if (parameter[1].constructor != Array) parameter[1] = [parameter[1]]; return parameter[1].map(function(value) { return key + ''='' + encodeURIComponent(value); }).join(''&'')...
2006 Feb 08
0
Get id of object being dragged
...'ve been able to get heaps done. My one problem is that I can''t seem to get the id of the object being dragged. Here is the code I am using: new Draggable(''Idea'',{handle:''IdeaHandle'',change:function(element){$(''test'').innerHTML = encodeURIComponent(element.id)}}); yet the way I reference the id works for a droppable: Droppables.add(''IdeaPad'', {onDrop:function(element,dropon){alert(''id:'' + encodeURIComponent(element.id) + '', dropon :'' + dropon.id + '', pos:'' + element....
2006 Feb 09
3
Autocompleter Request depends on other field
Hi list, First, I have a textbox "username". I also have an Autocompleter'd textbox called "products". Is there a "built in" way to have the Autocompleter's Ajax Request pass the value in the "username" field ? (I tried adding "parameters: $F('username')" to the Autocompleter's options, but, that grabs the initial username
2005 Sep 28
0
Logging to the server
...ototype.js (of course) and Rails. Michael Logger = { loggingUrl: ''/myapp/admin/log'', debug: false, log: function(msg, level) { if (!loggingUrl) { return; } try { new Ajax.Request(Logger.loggingUrl, { parameters: ''msg='' + encodeURIComponent(msg) + ''&level='' + encodeURIComponent(level), method: ''post'', asynchronous: true }); } catch (e) { if (Logger.debug) { alert("Logging error\nMessage: " + msg + "\nError: " + Ob...
2010 Sep 21
0
Upload form with uploadify jquery plugin
...lt;%= max_size %>) { alert(''The image'' + fileObj.name + '' is too large.'') return false; } }, scriptData : { ''format'': ''json'', ''<%= session_key_name %>'' : encodeURIComponent(''<%= u cookies[session_key_name] %>''), ''authenticity_token'' : encodeURIComponent(''<%= u form_authenticity_token if protect_against_forgery? %>'') } }); $(''#uploadify_submit'').click(function(event...
2009 Jun 14
6
Unable to make observe_field work
...t;text/javascript"> //<![CDATA[ new Form.Element.EventObserver(''friend'', function(element, value) {new Ajax.Request(''http://mysite.com/friendships'', {asynchronous:true, evalScripts:true, parameters:value + ''&authenticity_token='' + encodeURIComponent(''...edited...'')})}) //]]> </script> -- Posted via http://www.ruby-forum.com/.
2007 May 05
2
Problem with escape
Hello, I have a little problem with the escape function. Here is my code: function saveData() { new Ajax.Request("post.php", {method:"post", parameters:''message=''+escape(document.getElementById("shoutitmessage").value) } ); } If I have the escape function in my script I can''t post some characters e.g. ä,ö,ü,ß but if
2008 Jul 17
2
Problem with link_to_remote, RJS and jRails
Hi, everyone, I''m trying to update the content of a div using link_to_remote and RJS template. Everything works fine if I use the default Prototype/Scriptaculous libraries, but I want to use jRails ''coz other parts of my application use a lot of jQuery. Here are the steps I done: 1. inside StatesController.rb I defined the following action: def update_view # do nothing just