forum

Home / DeveloperSection / Forums / Disabling Pop Up in javascript

Disabling Pop Up in javascript

Anonymous User 1771 20-Nov-2014

I am new to Javascript. My req is to not show the pop up if i get list from server side as empty list. Before this requirement i was doing something like below code where as soon as user hits the URL, the popup comes as i have used window.onload . Now the requirement got changed and i need to show pop up only when there is some data from backend. Please help me on this.

<script>
    window.onload = function () {
        $('#homePopup').bPopup({
            easing: 'easeOutBack', //uses jQuery easing plugin
            speed: 550,
            transition: 'slideDown'
        })
    }
</script>
 
<div id="homePopup"><span class="buttonCloseModal b-close"><span>X</span></span>
  <h1>Notifications</h1>
 
<div class="ListContainerScroll">
        <div>
               <asp:Repeater ID="rptrNotification" runat="server" OnItemDataBound="rptrNotification_ItemDataBound">
                        <ItemTemplate>
                              <div>
                                    <asp:Literal ID="litNotificationTitle" runat="server" Text='<%# Bind("Title") %>'></asp:Literal>
                              </div>
                               <div>
                                     <asp:Literal ID="litNotificationDesc" runat="server" Text='<%# ((SPListItem)Container.DataItem)["NotificationDescription"] %>'></asp:Literal>
                               </div>
                         </ItemTemplate>
               </asp:Repeater>
                    <div class="noDataAvailable" runat="server" id="divNoDataAvailable" visible="false"></div>
        </div>
   </div>
</div>

 


Updated on 21-Nov-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By