Working with MODALS within a database LOOP

I am trying to eliminate my onClick=“NewWindow” code and replace with modals. If not in a loop I have no problems in doing that.

However, I am struggling with how to incorporate the modal concept when in a loop with my asp include files etc.

Any help would be appreciated.

Thank you!

This would be the code (works fine) if not in a loop…

 <div class="modal-overlay">
      <div class="modal-inner">
        <div class="modal-container">
          <div class="modal-header">
            <a href="#" class="modal-close">&times;</a>
          <div class="modal-content-1 hide">
           <!--#INCLUDE FILE=" Products/Item_1.asp"-->
          <div class="modal-content-2 hide">
           <!--#INCLUDE FILE=" Products/Item_2.asp"-->
<a class="button" href="#" data-open-modal data-modal="1">PREVIEW</a>
<a class="button" href="#" data-open-modal data-modal="2">PREVIEW</a>

This is in a LOOP…


<a href="#" onclick="NewWindow('<%=rs("PreviewLocation")%>',INFO,'500','600','yes','left'); return false;">PREVIEW</a>

rs(“PreviewLocation”) is the path to the product ID that’s in the database

How would you do it if there was no loop?

Hi! Are you sure that it can work without a loop in general?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.