title: Creating a suitable replacement for prompt
body: <p>My users may use IE7 and I want to avoid using the prompt function. I have working code using prompt but am unsure of a good way to replace it.</p>
  
  <p>My usage requirement is this. User clicks an image button and then has to OK/Cancel a prompt. If OK is pressed, a Reference is requested which is assigned to RemovePalletReference for use in code behind. </p>
  
  <pre><code>&lt;asp:imagebutton id="ibRemoveFromPallet" runat="server" ImageUrl="../Images/Icons/removefrompallet.gif" OnClientClick="return ConfirmReroute();"&gt;&lt;/asp:imagebutton&gt;                   
  &lt;asp:HiddenField ID="RemovePalletReference" runat="server" value="" &gt;&lt;/asp:HiddenField&gt;
  </code></pre>
  
  <p>You can see above that I first call ConfirmReroute() which is the following js function.</p>
  
  <pre><code>    function ConfirmReroute() 
      {
          if (confirm("Confirm Remove Unit From Pallet") == true) 
          {
              var pmt;
              do {
                  pmt = prompt("Please Enter a Reference:", "");
              }
              while ( pmt == null || pmt.length &lt; 1);
              document.getElementById('&lt;%= RemovePalletReference.ClientID %&gt;').value = pmt;
              return true;
          }
          else
              return false;
      }
  </code></pre>
  
  <p>I wish to replace the code where the user has pressed OK to the <code>confirm</code>.  I tried with jquery UI modal dialog but could not work it out. I think it may be workable using callbacks but this is a new subject to me and I'm struggling.</p>
  
  <p>Please in answers show some code to help me out. Grateful for any assistance.</p>