Well all I can really tell you is that won't work. If that's client Side JavaScript then you can't access dominoDoc which I assume is the name of your bound document.
There might be a way to more or less inline create a CSJS var with the doc id... I'm not sure...
But what I've done to interact between CSJS and SSJS is use the RPC tool in the Ext. Library/9.0+
You give it a name and method. The method will run serverside but gets called from client side. So you can pass values back and forth like that.
There's at least 1 video on this on NotesIn9... I'm not sure which one but I THINK John Jardin was the contributor.
Hope that helps