Click here to Skip to main content
15,879,474 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
hi

I am getting the problem with multiple popup window in asp.net using jquery/javascript


Iam able to create the One Pop window and it working fine , but iam not able to generate the multiple popup window, i need to generate the multile popup windows.
its my sample code iam able to attain the single popup winodw

<div id="Div1" style="display: none;" title="Siva Kumar Reddy">
      <br />
     <table>
     <tr>
     <td colspan="3">
     <asp:TextBox ID="TextBox2"
          runat="server" Height="270px" Width="250px" TextMode="MultiLine"
             CssClass="textbox"></asp:TextBox>
          </td>
     </tr>

      <tr >
    <td colspan="2"><asp:TextBox
              ID="TextBox3" runat="server" Height="50" TextMode="MultiLine"
            CssClass="textbox"></asp:TextBox></td>
    <td>
          <asp:Button
              ID="Button2" runat="server" Text="Button" CssClass="button" /></td>
     </tr>
     </table>


      <br />
  </div>


Here is the Function


    <script type="text/javascript">

    jQuery(document).ready(function () {
        jQuery("#Div1").dialog({
            bgiframe: true, autoOpen: false, height: 400, modal: false
        });
    }); 
</script>



And here Iam Calling


<a href="#" önclick="jQuery('#Div1').dialog('open'); return false">Click here to see the popup</a>
br mode="hold" /> Please Give Me the Idea to Get the Popup windows in asp.net
Posted
Comments
Sergey Alexandrovich Kryukov 24-Apr-12 8:37am    
Why anyone would ever need multiple pop-ups? :-)
--SA
[no name] 24-Apr-12 8:59am    
for chatting applications
i am going ton use this popup windows
Sergey Alexandrovich Kryukov 25-Apr-12 16:28pm    
This is not good for you, especially if it's tons.
--SA
jkirkerx 25-Apr-12 1:21am    
My experience is that people are scared of popup windows, because they think that their computer is getting infected with another virus or malware.

I'm sure I could create multiple modal popup windows, position them and layer them, but my effort would be futile, since I would have to trash the code, after receiving hundreds of complaints.
Sergey Alexandrovich Kryukov 25-Apr-12 16:28pm    
Agree.
--SA

1 solution

You're going to need more <div></div> tags to show as popups. The way you have written your page dictates that you will only ever have one popup. You can click on:

HTML
<a href="#" önclick="jQuery('#Div1').dialog('open'); return false">Click here to see the popup</a>


for the rest of time, you'll only ever see the one popup. For each popup you will need:

HTML
<div id="UNIQUEID" style="display: none;" title="Siva Kumar Reddy">
</div>


Where UNIQUEID is a string uniquely identifying the <div></div>. You can then open the popups by:

HTML
<a href="#" önclick="jQuery('#UNIQUEID').dialog('open'); return false">Click here to see the popup</a>


again, where UNIQUEID is a string uniquely identifying the <div></div> you want to show as a popup.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900