Closed clinton4 closed 10 years ago
Serialize not working on demo for chrome (is working with Firefox). In crome, error thrown is Uncaught TypeError: Converting circular structure to JSON
Here a workaround.
0.5.2 its working!:
fn.serialize = function($widgets) {
$widgets || ($widgets = this.$widgets);
var result = [];
$widgets.each($.proxy(function(i, widget) {
result.push(this.options.serialize_params(
$(widget), $(widget).coords().grid ) );
}, this));
return result;
};
In 0.5.3 its not working in Chrome and in Firefox its looks wrong.
fn.serialize = function($widgets) {
$widgets || ($widgets = this.$widgets);
return $widgets.map($.proxy(function(i, widget) {
var $w = $(widget);
return this.options.serialize_params($w, $w.coords().grid);
}, this));
};
Yes. serialize function is not working in 0.5.3.
I got this error:
Uncaught InvalidStateError: Failed to read the 'selectionDirection' property from 'HTMLInputElement': The input element's type ('button') does not support selection.
which is different from yours.
The solution seems to be avoiding serializing elements that are already serialized. Only serialize "object" elements, as explained here:
http://stackoverflow.com/questions/9382167/serializing-object-that-contains-cyclic-object-value
Would that work?
The serialize method was working but returning the serialized array wrapped into a jQuery object. And the JSON.stringify method breaks trying to convert a jQuery object in some browser implementations.
Thanks for the notice!
Working fine now in 0.5.4. Thank you very much. :)
Hi, Serialize do not work in this demo. http://gridster.net/demos/serialize.html