I have an ajax call (using a blackberry webworks api [but I don't think that bit is relevant]).

At the moment I'm sending params like this:

```
params: {
   user: userId,
   sid: sessionKey,
   db: dbId,
   urn: activeRecord
},

```

I'd like to build the params (sometime I won't need them all, and I don't want to send blank data).

However if I try to build a string and send that the program errors.

EG:

The error occurs if I try and build the params like this:

```
var myParams ="";

if(userId != ""){
   myParams != "user:" + userId + ",";
}

if(sessionKey != ""){
   myParams != "sid:" + sessionKey + ",";
}

myParams = myParams.slice(-1);

```

Then try add params in the call like so:

```
params: { myParams },

```

Any thoughts?