0

i have a change password popup window.i want to send the user name and changed password to the parent window after it has been successfully changed by the popup window and want the popup to be closed after few seconds....but i am not able to call the javascript from the .cs file.i am giving the code..can u help me how to do it...`

string script = "<script>" + "return updateParent();";
         if (!ClientScript.IsStartupScriptRegistered("someKey"))
         {
             ClientScript.RegisterStartupScript(this.GetType(), "someKey", script);
         }   

<script type="text/javascript">
       function updateParent() {
           opener.document.form1.getElementById(Username).value = document.form1.getElementById(Username).value;
           opener.document.form1.getElementById(pswrd).value = document.form1.getElementById(new_paswrd).value;
           self.close();
           return false;
       }
</script>`

1 Answer 1

1

Change this:

string script = "<script>" + "return updateParent();";

to this

string script = "<script>" + "return updateParent();" + "</script>";

:)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.