I m returning one value from pop up window now i want is the text box value changes from pop up window it should change its background color to red, otherwise no change will be reflect.
What m i doing is
<input type="button" id="button1" value="button1" style="width:95%;font-family:Verdana;font-size:9px;" onclick="window.open( '<%= Url.Action( "PopUp", "Home" ) %>' ,'popup','height=410','width=200','target=popup','center','front');" onfocus="if(document.getElementById('HiddenVal').value!=null||document.getElementById('HiddenVal').value!=''){txtbutton.value=document.getElementById('HiddenVal').value ; document.getElementById('HiddenVal').value='';}" />
where txtbutton is text box and button1 is the button which open the pop up window. I want to change the color of text box if its value changed; otherwise its background should be white.
remove your onfocus code from button and then place this code inside your js file.
one more way you can try is write a function inside your parent window and then call that function from child window-something like this-
call this function from child window-