Welcome! Log In Create A New Profile

Advanced

WB25 - Serialise in Browser Code

Posted by PeHoBe 
WB25 - Serialise in Browser Code
April 21, 2021 04:03PM
Hello team

I have a hybrid class, meaning a class that can be used server and browser side.
On the server side I can perfectly serialise the class into a string (that is browser synchronised) and on the browser side I can perfectly deserialise it again into the class on the browser side.

On the other hand, I just cannot seem to get the serialise to work on the browser side again.
If I use the below browser side syntax I get an error in the browser (no compiler errors).
//Serialize the object to pass to the Ajax call
SerBuf is Buffer
Serialize(NewMOList,SerBuf,psdJSON)
AJAXExecute(ajaxUpdateControls+ajaxSynchronizeServerVariables,MediaObjectAdd,SerBuf)


Upon execution I get this message by Chrome:
Quote
Chrome Message
Error in the browser code:
Incompatible type

So it seems the buffer type is the issue but when I change it to string, I get a compilation error on the serialise() function...

Did anybody get the serialise to work or am I just having a brain f@rt here ?

Thanks in advance !

--
Peter Holemans
www.mcs2.eu
www.pixontri.eu



Edited 1 time(s). Last edit at 04/21/2021 04:03PM by PeHoBe.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: