title: Manipulate webpage based on user selection of popup window in asp.net website using JavaScript?
body: <p>I have an asp.net website. I want to open a popup asking for user confirmation in code behind page.</p>
  
  <p>I have a drop down with some values. "cancel ticket" is one of those values. So when user selects this item, I want to display a confirmation box asking user "Are you sure you want to cancel the ticket"?</p>
  
  <p>I've tried some code using JavaScript,</p>
  
  <p>HTML: </p>
  
  <pre><code>&lt;asp:DropDownList ID="ddlStatus" runat="server" CssClass="selectstyle" DataTextField="Name" DataValueField="ID" onchange ="GetSelectedItem(this);" /&gt;
  </code></pre>
  
  <p>JavaScript : </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function GetSelectedItem(x) {
          if (x.value == 4) {
              return confirm("Are you sure you want to cancel support ticket ?");
          }
      }
  </code></pre>
  
  <p>which is displaying a popup as I want.</p>
  
  <p>Now, I want to make a textbox and a label visible if user clicked on "OK" and reset dropdownlist if user clicked on "Cancel"</p>