similar to: why is Hash#toQueryString including functions

Displaying 20 results from an estimated 30000 matches similar to: "why is Hash#toQueryString including functions"

2005 Dec 08
2
Prototype.js Hash Methods
Hi, Has anyone seen any documentation on the Hash Object defined in the prototype library? To be precise the following methods - 1. keys 2. values 3. toQueryString 4. inspect 5. Merge I am trying to play around with them and have come up with the following examples - var h = $H({name: "john doe", email: "john-Ch9RrZxMC0c@public.gmane.org", msg: "say hello to
2007 Oct 26
0
prototype's toQueryString() weird behavior in IE?
Hi all, situation: uploader + form with a "title", a "description" and a "tags" field. Using prototype I encode those (among other values) to a querystring. In the case a field is left empty, i want the querystring to look like this: &title=&message= ...etc. No problem in FF (pc/mac) but when i submit the empty values to IE, they are returned as
2006 Jun 16
3
onCreate not getting triggered.
I am trying to get a loader to display during ajax requests, but the "onCreate" is not getting triggered. The onComplete does. function loadComponent(section){ values = arguments[1] pars = $H(values).toQueryString() pars = "section="+section+"&"+pars var url = ''/internal/ajax/requests.php''; var ComponentLoader = new
2007 Jul 10
9
Other parameters on InPlaceEditor
Hi to all, I have a doubt on like passing other URL parameters to InPlaceEditor function. For Ajax.Updater I can use "parameters:", but for InPlaceEditor (or InPlaceCollectionEditor) I cannot use "parameters". How I make to pass other parameters to the page that callback? A sample code: ---------------------------------- var editor= new Ajax.InPlaceCollectionEditor(el, url,
2007 Apr 17
5
Problem with toQueryParams()
I''m sure this has been covered before, but here goes... Anybody noticing some odd behavior with submitting forms through Ajax.Request? I thought at first it was a problem with Form.serialize, but was able to trace it back to line #975 (in prototype 1.5.1_rc2) which calls "toQueryParams" on the parameters that are passed into the new Ajax object if it is a string. This is the
2007 Aug 02
7
Difficulty using match
A have an observer watch for a click on a link. Inside the triggered function, I want to extract a piece of information from the URL. Currently I am able to do: alert(Event.element(el)); This displays the url string of the link, which is exactly what I need to work with. However, when I try: Event.element(el).match(//); I get a javascript error "selector.match is not a function". I
2008 Jan 19
1
Set Return Type XML in Prototype
Please help i can''t return xml data using prototype. If i use data from direct xml file then it works fine but when i use ajax request with header content xml it''s not working My code just work on IE but in FF it does not working. My code sample are given below If any one already done this kinds of job Please help me as soon as possible. var xmlDoc; function Claulate() { var
2007 Dec 20
3
What is $super
Greetings, I had a question about the $super argument that I wasn''t able to find in documentation, searching etc. What exactly is the $super argument. Is it a reference to the super class''s prototype function? Or is it an instantiated object of the super class that is passed to the subclass''s method? I am completely confuzzled on this one, my typical
2006 Apr 28
3
Serialize / deserialize an associative array
Perhaps I missed something but I don''t see an easy way to do this ? Basically just wanna hold some ui state in a cookie. Did I miss something obvious ? Best Matt *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorized and
2008 May 22
9
building a many-to-many structure in javascript
hi, for some purpose, I need a "in-javascript database", maybe built with some Prototype $H function calls for creating "tables" but what about junction tables, I mean those which express many-to- many relations between two entity tables ? I though using concatenation of strings with a separator, for example "key1 key2" "1234-56" or "ABC \n 789"
2008 Apr 07
5
trying to use Ajax.InPlaceEditor
Hi, I''m programming a Ruby on Rails project where I am on the edit page of /boxes/1/edit and I''m trying to make an InPlaceEditor for the color property. (E.g. red box, blue box, etc.) My problem is that after successfully saving the value in the database, the response I get from the server is javascript, and it''s being rendered in the place where the updated value is
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 (toQueryPair and
2007 Sep 21
1
Weird data from evalJSON
I am trying to have prototype perform a request and return to me a javascript object representing the json string returned by the request. I want to iterate over the contents to print each object in the json string. The value of transport.reponseText in onSuccess is what I would expect. But once I try to perform evalJSON() on this text it gives me a bunch of extra function()s when i try to
2007 Jun 14
3
serialize with sortable_element (rails)
creating multiple lists with sortable_element and would like to serialize them and save back to the db. i have the sorting between multiple lists working properly. can anyone point me in the right direction for serializing and saving? thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2008 Feb 25
1
string to hash
how do i turn a string into a hash? why does this not work??? var test = "{ test: ''dfgj''}"; console.log($H(test).inspect()) half the prototype source code get inside the hash it makes??? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to
2007 Jul 02
2
Object Property Sorting - Hash?
I''m trying to sort an object by its property names. As I understand it, iterating over an object using for...in or using Hash.each() (or Hash.sortBy()) does not guarantee the order of the properties. Is there an easy and low-overhead way to guarantee order? Or would I need to have some type of collection object that uses arrays instead of the property-value configuration that Hash
2007 Oct 15
3
JavaScript error after including Prototype library
Hello, I''ve started seeing this error after including Prototype: Form.Element.Serializers[method] is not a function http://qaslweb1.crossmediaservices.com/shoplocal/scripts/prototype.js Line 2754 You should be able to see this error, using either Firefox or IE, when browsing to: http://qaslweb1.crossmediaservices.com/ Any ideas? Since this is a version of our original site rebranded
2007 Jun 09
23
hoverclass on droppable zone
Hi guys, I''m trying to make a drag''n''drop portal using sortable element. I would like to apply the "hoverclass" option only on the droppable zone instead of the column border. Any idea a about the solution? Thanks for any help, Sabri --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2006 Apr 18
2
RE: how to evaluate responseText as an array?
getSelectedGridData()[getSelectedRow()] = eval(response.responseText); I believe that will work. Greg ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Joe Hudson Sent: Tuesday, April 18, 2006 12:56 PM To:
2005 Aug 17
1
[PATCH] Builder with hash for style attribute
The attached patch transparently extends the Builder from util.js to take an object/hash value for the style attribute. The elements of the hash are then used to set the respective properties of the style object. The purpose of this patch is twofold: (1) Make it easier to use the Builder with generated style properties. (2) I''m not sure if assigning a string to element.style is even