i need two popup box like this.

<div class="pro_img">
<img src="web_img/IGN-GRAND.png" alt="Project Image" width="211" height="162" border="0">
<a href="#" onclick="popup('popUpDiv')"><br>

<div id="popUpDiv" style="display: none;">
<a href="#" onclick="popup('popUpDiv')"><div id="rokbox-close"></div></a>
<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 id="k2ModuleBox85" class="k2LoginBlock">
 <form name="form1" onsubmit="javascript:return Validate();" action="downloadpdf.php" 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 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 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 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">


if i click that download button it will display popup box with text fields,after fill these details click submit button pdf file start to download. same like i want one more popup box in same page with same fields. add another popup code its not working.


// We'll be outputting a PDF
header('Content-type: application/pdf');

// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded_ign_1.pdf"');

// The PDF source is in original.pdf
readfile('IGN GRAND_1.pdf');

maybe .dialog() can help you out.

or sometimes i use overlay/dialog(css)

    position: fixed;
    top: 0;right: 0;
    bottom: 0;left: 0;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #000000;
    opacity: .15;
    filter: alpha(opacity=15);
    -moz-opacity: .15;
    z-index: 101;
    display: none;
{   display: none;
    position: fixed;
    width: 350px;
    height: auto;
    top: 50%;
    left: 50%;
    margin-left: -190px;
    margin-top: -100px;
    background-color: Beige;
    border: 2px solid Black;
    padding: 0px;
    z-index: 102;
    font-family: Verdana;
    font-size: 10pt;

<script type="text/javascript">
$(document).ready(function ()
      $("#add_event").click(function (e)
      $("#closec").click(function (e)
   function ShowDialog(modal)
      if (modal)
         $("#overlay").click(function (e)

   function HideDialog()


<input type="submit" id="add_event">
<div class="overlay" id="overlay"></div>
<div class="dialog" id="dialog">
    <input type="text" name="ename"/>
    <input type="text" name="datestart"/>
    <input type="text" name="dateend"/>
    <input type="text" name="evenue"/>
    <input type="submit" name="submit"/>
    <input type="submit" name="cancel" value="Cancel" />