I assume that you are referring to SoPHIE variables here? To accomplish this you need to have a look at the jquery ajax requests. The code below is the basic structure that you need to perform such actions. Within the data array you are able to send your values to the server and these can be accessed within the Ajax Script tab. The default script shows how parameters can be retrieved there.
jQuery.ajax({
url: '/expfront/ajax/process',
data: {
contextChecksum: jQuery('#contextChecksum').val(),
},
dataType: 'json',
async: true,
error: function(jqXHR, textStatus, errorThrown) {
},
success: function(result, textStatus, jqXHR) {
}
});