0 Replies Latest reply on Jun 1, 2010 1:49 PM by webacity

    popup window disappears

    webacity Level 1

      Hi

       

      I have a text box field:

       

        <form id="form1" name="form1" method="post" action="">
          <span id="sprytextfield1">
            <label for="calc2"></label>
            <input type="text" name="calc2" id="calc2" onchange="checkCalc()"/>
            <span class="textfieldRequiredMsg">A value is required.</span></span>
        </form>

       

      when user types in correct answer and hits return key, it calls a function:

       

      <script type="text/javascript">

       

      function checkCalc(){
          if (document.form1.calc2.value == "1"){
          MM_showHideLayers('pop1','','show','pop2','','hide');
          }
          else { alert("you are incorrect!");
          }
      }
      </script>

       

      The popup window appears but only for a second and then it disappears

       

       

      I use the same MM_showHideLayers('pop1','','show','pop2','','hide') function elsewhere and the pop up remains open

      The pop up is a ap div, with default setting set to hidden. The function then shows the layer, by setting the visability to 'show'

       

      <p>Velit esse cillum dolore quis nostrud exercitation consectetur <span class="hyperlink" onmousedown="MM_showHideLayers('pop1','','show','pop2','','hide')" onmouseup="MM_effectHighlight('pop1 content', 1000, '#FFFFFF', '#EAEAEA', '#FFFFFF', false)">adipisicing</span> elit. In reprehenderit in voluptate lorem ipsum dolor sit amet, sed do eiusmod tempor incididunt. Ut labore et dolore magna aliqua.</p>