This is a migrated thread and some comments may be shown as answers.
how to clear the exiting values before open the rad window
1 Answer 45 Views
This is a migrated thread and some comments may be shown as answers.
Uma
Top achievements
Rank 1
Uma asked on 25 Jan 2012, 04:44 AM
Hi,
 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);
          oWnd.show();
      }
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?

Thanks,
Uma

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 25 Jan 2012, 06:50 AM
Hello Uma,

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

JS:
<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 = " ";
     }
</script>
Note: Here I added the ClientID of TextBox in a HiddenField and access that on client side.

Thanks,
Princy.
Asked by
Uma
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or