troubleshooting Question

Popup window upon selecting dropdown option

Avatar of Stefan Motz
Stefan MotzFlag for United States of America asked on
6 Comments1 Solution252 ViewsLast Modified:
Hi Experts,
The code below opens an alert when "Approved" is selected in the dropdown.
Instead of the alert I would like another window to be opened, because I'd like to place a longer, formatted message, and the alert is not sufficient for this goal.
The popup window should have an OK button which will close the popup, before the Submit button can be clicked.
I would appreciate your help.
      <script type="text/javascript">
       function onLoad() {
            document.getElementById("status").onchange = confirmApproved;

       function confirmApproved() {

	  var e = document.getElementById("status");
	  if (e.options[e.selectedIndex].value == "Approved") {
	    if (confirm("Please read the terms and conditions and click OK! More text....")) {
	      // do soemthine
	    } else {
	      // don't do it
<body onload="onLoad()">

<form name="editor" method="post" action="Send.asp">
  <select id="status" name="Status" onchange="confirmApproved">
    <option value=""></option>
    <option value="Pending Approval">Pending Approval</option>
    <option value="Approved">Approved</option>
    <option value="Disapproved">Disapproved</option>

  <input type="Submit" name="Submit" value="Submit" />


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros