if i click Brochure i want to display one popup box in that will display one form after submitting the form brochure.php page will show.in that page i need to download some files.problem is while clicking Brochure its showing popup box if i close are submit the form again that page was loading and showing again popup box.what i want is if i click Brochure it show popup after submit only will show the brochure.php page.

<div class="menu">
<ul>
<li><a href="index.html">About us</a></li>
<li><a href="projects.html">Projects</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li><a href="brochure.php" class="current">Brochure</a></li>
<li><a href="contact_us.html">Contact us</a></li>
<li><a href="enquiry.html">Enquiry</a></li>
</ul>
</div>



<body onLoad="popup(2);">

<div style="display: none; height: 100px !important;" id="blanket"></div>

<div id="popUpDiv" style="display: none;">
<div id="rokbox-close"></div>
<div id="rt-popup" style="background-color:rgba(230, 224, 224, 0.59);">
      <div class="rt-block">
        <div class="module-title">
          <h3 class="title">Download Brochure</h3>
        </div>
        <div id="k2ModuleBox85" class="k2LoginBlock">
 <form name="form1" onsubmit="javascript:return Validate();" method="post">
             <fieldset class="input">
              <p id="form-login-username">
                <input id="modlgn_username" value="Name:" name="name" class="inputbox" size="18" onblur="if(this.value == '') { this.value='Name:'}" onfocus="if (this.value == 'Name:') {this.value=''}" type="text" style="background-color:rgba(230, 224, 224, 0.59);">
              </p>
               <p id="form-login-username">
                <input id="modlgn_username" value="E-mail:" name="email" class="inputbox" size="18" onblur="if(this.value == '') { this.value='E-mail:'}" onfocus="if (this.value == 'E-mail:') {this.value=''}" type="text" style="background-color:rgba(230, 224, 224, 0.59);">
              </p>
               <p id="form-login-username">
                <input id="modlgn_username" value="Phone:" name="phone" class="inputbox" size="18" onblur="if(this.value == '') { this.value='Phone:'}" onfocus="if (this.value == 'Phone:') {this.value=''}" type="text" style="background-color:rgba(230, 224, 224, 0.59);">
              </p>
               <!--<p id="form-login-remember"><textarea size="18" name="enquiry" rows="" value="Message:" onblur="if(this.value == '') { this.value='Message:'}" onfocus="if (this.value == 'Message:') {this.value=''}"></textarea></p>-->

              <input name="Submit" class="submit" value="Submit" type="submit">

            </fieldset>

          </form>
        </div>
      </div>
    </div>
    </div>
    </body>

javascript

function popup() {
 setTimeout(function(){
   document.getElementById("popUpDiv").style.display = "block";
},500);
}

function pop_up_light_box_with_delay(secs)
  {
    setTimeout('popup()',secs*1000);
  }

document.getElementById("rokbox-close").onclick = function () {
    document.getElementById("popUpDiv").style.display = "none";
};
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.