HTML CODE
<
input
type
="button"
value
="open new win"
onclick
="openWin()"
>
< input type ="button" value ="1" onclick ="setValue('txt1')" >
< input type ="button" value ="2" onclick ="setValue('txt2')" >
< input type ="text" id ="txt1" >
< input type ="text" id ="txt2" >
< input type ="button" value ="1" onclick ="setValue('txt1')" >
< input type ="button" value ="2" onclick ="setValue('txt2')" >
< input type ="text" id ="txt1" >
< input type ="text" id ="txt2" >
JS
function
openWin()
... {
window.open(window.location.href,"","width=200,height=200");
}
function setValue(obj)
... {
window.opener.document.getElementById(obj).value=event.srcElement.value;
}
... {
window.open(window.location.href,"","width=200,height=200");
}
function setValue(obj)
... {
window.opener.document.getElementById(obj).value=event.srcElement.value;
}