connecting from browser to kdb

newbie question:

I want to connect from browser to kdb backend,  I am using c.js (for serializing / de-serializing), I am trying to sub symbol quotes, I am sending command

“.u.sub[kxtrades;MSFT]”,  javascript code here:

function subscribeData(){

        console.log(“subscribe Data…”);

        //var command = [‘.u.sub’];

        var args = [‘kxtrades’, ‘MSFT’];

        ws.send(serialize([‘.u.sub’, args]));

    }

all I get is echo of the call I send to server, no matter what format I do or how I send, always an echo comes back of whatever I sent to server.

what obvious thing I am missing, do some config needs to happen on server to accept and response to stuff coming from WS connection from browser, is there a protocol issue going on?

Thanks

What is your definition of .z.ws and ws.onmessage?

here is my onmessage:

ws.onmessage = function (e) {

            d = deserialize(e.data);

            for (var x in d) {

                console.log("recv: ", x + ‘=’ + d + ‘\n’);

            }

        }

Just logging whatever comes on socket on console. there are no changes on server to .z.ws. 

Update:

I confirmed, z.ws is not set yet on server side

.z.ws should be defined on the server.