serialize

jQuery serialize() not working on Ajax-loaded dialogues in IE

Hi, I'm hoping someone on this list can offer some help. I have a page that uses ajax to loads a form (id: "editform") into a jQuery-ui dialog box. The dialog box has a button attached - when someone changes the form and clicks this button it triggers a function which serializes() the data and sends via $.post to replace a div on the pa...

looping through DOM / mootools sortables

I can't seem to get a handle on my list of sortables. They are a list of list elements, each with a form inside, which I need to get the values from. Sortables.implement({ serialize: function(){ var serial = []; this.list.getChildren().each(function(el, i){ serial[i] = el.getProperty('id'); }, t...

PHP SESSION: SESSION Variables Automatically Reset after Unserialize()

I am testing codes from build internet which is a tutorial of OOP. I got a error message: unserialize() expects parameter 1 to be string, object given in includes/global.inc.php on line 20 Here is the code of serialize(): $_SESSION['user'] = serialize(new User(mysql_fetch_assoc($result))); And here is the code of unserialize...

JQuery process form

This one is a really simple question (I hope), but as just laening/getting to grips with Jquery I apologise in advance. If I have a form e.g. <form id="form"> <input type="text" name="abc" /> <input type="text" name="def"/> <input type="text" name="ghi"/> <input type="submit" name="try" id="try" /> </form> Anf then send it via JQuer...

Cannot Access Closed Stream

I'm trying to use the Caching Application Block to cache some images (these images take a long time to render) BitmapSource bitmapSource; ///some bitmap source already created _cache /// Caching Application Block String someId; //id for this image, used as the key for the cache using (var stream = new MemoryStream()) { ...

Efficient way to serialize form data to .NET ASHX/C# from JQuery

As most people, I have read a seen a lot of examples of getting data from a form (html) and being able to effeciently handle the posted data say within an ASHX (Generic Handler) page... and from there say update a database via a stored procedure.. maybe I am trying to automate things too much?? !! So I have a HTML form with say 50+ fo...

Ignore binary serialization on a property

I have a regular C# POCO. At the class level, I am decorating the object with [Serializable()]. That said, I am using the Linq Sum() on one of the properties and I am receiving an error upon serialization. If possible, I would like to just simply ignore this property. However, the [XmlIgnore()] is only for Xml Serialization, not Bina...

WF4RC, How to: Activity to Xaml?

Hello all, I have Googled a bit, and cannot seem to find any examples of Xaml-fying Activities - good, bad, or otherwise! public static string ToXaml (this Activity activity) { // i would use ActivityXamlServices to go from Xaml // to activity, but how to go other way? documentation // is slim, and cannot infer proper usage...

Rails Seralized My Object One Way & Refuses to Change

I have a rails class that serializes one attribute. class Statistic < ActiveRecord::Base serialize :userlist end When a statistic object is loaded and it's userlist changed from a String to an Array userlist always gets serialized back into a String. The framework seems to remember and deserialize :userlist into a String ...

serialize function for string values to use in jQuery ajax datastring

how to sanitize user inputs that you gather by jquery .val() so you can write it in a dataString... in the example you see below when user writes if some text that contains & the rest of the comment doesn't seem to work fine because it counts the rest as an other variable to POST.. is there a sanitaziation or serialization co...

What's the difference between using the Serializable attribute & implementing ISerializable?

Hi folks, what's the difference between using the Serializable attribute and implementing the ISerializable interface? Please clarify. TIA ...

Can Json.NET deserialize a flattened JSON string with dot notation?

I have a flattened JSON: { "CaseName" : "John Doe v. State", "CaseDate" : "<some date>", "Client.FirstName" : "John", "Client.LastName" : "Doe", "Client.Email" : "[email protected]" etc... } I want to deserialize it back to this entity: public class Case() { public string CaseName { get; set; } public ...

How can I validate the output of XmlSerializer?

In C# / .NET 2.0, when I serialize an object using XmlSerializer, what's the easiest way to validate the output against an XML schema? The problem is that it is all too easy to write invalid XML with the XmlSerializer, and I can't find a way to validate the XML that does not look cumbersome. Ideally I would expect to set the schema in ...

Don't want to JSON serialize the whole list of classes

Hey, I've got a IList of Sites in my application and Site has a large amount of properties. I'm wanting to convert this list to JSON to be used in a dropdownlist similar to this var sites = SiteRepository.FindAllSites(); return new JsonResult() { Data = sites, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; the problem...

how to write own serializer/deserializer?

Hello, I need to save objects - instances of classes - in my app like some filetype. How I can write own serializer/deserializer for it? Or exist some easier way how to save objects to some filetype? Using of io.serialization was commented as not so good solution for "real" app. Why? ...

How to profile Doctrine in Zend Framework

Good day. I'm using Doctrine as ORM for my Zend Framework project. This is the first time I use it. I've followed the ZendCasts Doctrine chapters, and everything works for me, but I needed to perform some profiling; There is a Doctrine_Connection_Profiler class that should be used to profile the Doctrine Model internal queries, but I'v...

Serialization via J2ME or BlackBerry APIs.

Is it possible to serialize an object into a string or a byte array using either the J2ME or BlackBerry APIs? Thanks. ...

Loading and binding a serialized view model to a WPF window?

Hello all. I'm writing a one-window UI for a simple ETL tool. The UI consists of the window, the code behind for the window, a view model for the window, and the business logic. I wanted to provide functionality to the users to save the state of the UI because the content of about 10-12 text boxes will be reused between sessions, but ...

Symfony/Doctrine: Unserialize in action vs template

Hi, Can anyone tell me why calling "unserialize" works fine in an action but gives an offset error in a template? It's basically possible to unserialize a database text result into a variable in an action and pass it to template, in which case it displays fine: $this->clean = unserialize($this->raw); <?php echo $clean ?> But not if ...

Coldfusion 8 and HTTP PUT - is there a way to PUT an object?

Hi all We are using EHCache with CF 8 to cache stuff on a central server using a RESTful interface over HTTP. I am trying to cache a cfquery object to the cache server. I can get this to work if I call EHCache direct (i.e. store it in a local cache) but if I try to cache on a remote server over HTTP I am running into problems. The co...