Cassio Posted March 12, 2003 Posted March 12, 2003 How do I retrieve a message box answer? I used this to pop up the message: Response.Write("<script>confirm('Are you sure ....?');</script>") Thanks Quote Stream of Consciousness (My blog)
*Gurus* Derek Stone Posted March 12, 2003 *Gurus* Posted March 12, 2003 Store the value in a JavaScript variable that once filled, submits the page to itself along with the user's response in either the query string or a form field. Quote Posting Guidelines
Cassio Posted March 12, 2003 Author Posted March 12, 2003 Sorry, but I know nothing about JS, could you give me a example? In this case the user can press OK or Cancel, how can I know if he presses ok? Could I put it in a invisible checkbox? Thanks Quote Stream of Consciousness (My blog)
*Gurus* Derek Stone Posted March 12, 2003 *Gurus* Posted March 12, 2003 <form id="hiddenForm" action="page.aspx" method="get"> <input type="hidden" name="answer" id="answer" value="" /> </form><script language="JavaScript"> var answer; answer = confirm('Are you sure ....?'); document.all.hiddenForm.answer = answer; document.all.hiddenForm.submit(); </script>Of course that's off the top of my head, so it might need some tweaking. Quote Posting Guidelines
Cassio Posted March 12, 2003 Author Posted March 12, 2003 Thanks! Quote Stream of Consciousness (My blog)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.