How can I access a JavaScript local variable from SSJS?

I’m trying to get the value of a JS variable from Server Side.

How can I accomplish this?

Here how I define my variable:

From Client Side I can access it using alert(viewname).

I’m doing this because I can’t find the way of passing a variable from Client Side to Server Side and I’m setting this variable from a button using

vista = ;

Subject: How about passing the data via a computed field or edit box control

You could use the getComponent(“xxx”).getValue() or setValue to get via SSJS and then use client-side JS to read/write from the control. Set the html attributes to hidden to hide it?

Howard