Try passing it to the file that opens in the new window.
function openWindow(){
var c_value = 'testparent';
window.open('test.php?myval=' + c_value, 'MyWin', 'width=200,height=200');
}
And in your test.php file you can get it with $_GET[‘myval’] in case of PHP. If you are in different language then you can do accordingly. If you dont want to use server side then you can store the value in a hidden form field in opener window and get it from opening window like this:
function openWindow(){
var c_value = 'testparent';
document.getElementById('test_value').value = c_value;
window.open('test.php', 'MyWin', 'width=200,height=200');
}