Sortserialize and hash output problem
-
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 (for a plugin):
function serialize(s) { serial = $.SortSerialize(s); alert(serial.hash); };
Now this has the following output:
sort3[]=links&sort3[]=imagesI want it to output:
links,imagesHow 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
ps 1: I am a noob so plz be gentle ??
ps 2: For now I use the alert function to check/see the hash output, eventually I want to put it in a texfield/form to sent it to the db.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Sortserialize and hash output problem’ is closed to new replies.