Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6041305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:38:32+00:00 2026-05-23T06:38:32+00:00

I m returning one value from pop up window now i want is the

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:38:33+00:00Added an answer on May 23, 2026 at 6:38 am

    remove your onfocus code from button and then place this code inside your js file.

    $('#button1').focus(function(){
       if(document.getElementById('HiddenVal').value!=null&&document.getElementById('HiddenVal').value!=''){
            $('#txtbutton', window.parent.document).css("background-color","red"); //Assuming txtbutton is ID of your textbox
             document.getElementById('HiddenVal').value='';
       }
    } );
    

    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-

    <script> 
    function ifDoneChild(val) {   
     $('#txtbutton').css("background-color","red");
    } 
    </script> 
    

    call this function from child window-

     $('#button1').focus(function(){
               if(document.getElementById('HiddenVal').value!=null&&document.getElementById('HiddenVal').value!=''){
                   window.parent.ifDoneChild(); 
                }
         });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can a function return more than one value directly (i.e., without returning in parameters
I came across the need to return a value from one function to another
I'm trying to get data from a webservice, returning just one result, the number
I need to get the value from a select list but JQuery is returning
I have a report that is returning a one data field to a tablix
In one of my queries it appears that the AVG function is returning an
One of my tables in my SQLite database is returning this error code below:
We are facing one problem with DownloadStringCompleted method always returning same result in windows
I have made one function in which I am passing a matrix and returning
I was wondering if returning a list, instead of returning a pointer to one,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.