bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

sortserialize and has problems

(1 post)
  • Started 11 months ago by Null
  • This topic is not resolved
  1. Hi,

    Don't know if anyone knows how this works, but I though, let's give it a shot.

    I currently have the following code (javascript) to get a hash:

    function serialize(s)
    {
    	serial = $.SortSerialize(s);
    	alert(serial.hash);
    };

    Now this has as output:
    sort3[]=links&sort3[]=images

    I want it to output:
    links,images

    How to do this?
    sort3[]= needs to be filtered
    & needs to replaced by ,

    I've tried things like:

    function serialize(s)
    {
            serial = $.SortSerialize(s);
            alert(serial.hash);
            var hash = serial.hash;
            var temp = hash.replace(new RegExp( "sort3\[\]=", "gi" ),'');

    and

    function serialize(s) {
        serial = $.SortSerialize(s);
        var hash = serial.hash;
        var temp = hash.replace(/sort3\[\]=/gi,'');
        alert(serial.hash);
    };

    But none worked :( Hope you guys can help.

    Many thx,

    Null

    Posted 11 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.