how to clear the exiting values before open the rad window

2 posts, 0 answers
  1. Uma
    Uma avatar
    18 posts
    Member since:
    Jan 2012

    Posted 24 Jan 2012 Link to this post

     I am using rad window , it display the textbox which creates dynamically.

    I am using the below code.

    function openWin() {
              var docId = document.getElementById('cpEditor_hdnDocId').value;
              var oWnd = $find("<%= radPropertyInspector.ClientID %>");
              oWnd.setUrl("NZFPropertyInspector.aspx?docId=" + docId);
    it works well.

    But, my problem is , once i close the window with some value in text box in in rad window,

    again i open the rad window, it shows the previous value of text boxes, then reload the new text box values.

    Text boxes are created dynamically.

    i need to empty the textbox before showing the rad window.

    How to clear the values of item before loading?

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 25 Jan 2012 Link to this post

    Hello Uma,

    Try to clear the TextBox on close itself. Here is the sample code.

    <script type="text/javascript">
       function OnClientClose(sender,args)
            var HiddenField1= document.getElementById("HiddenField1");
            var TextBox1= HiddenField1.value;
            var txt1 = document.getElementById(TextBox1); // access the TextBox.
            txt1.value = " ";
    Note: Here I added the ClientID of TextBox in a HiddenField and access that on client side.

Back to Top