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">×</a>
</div>
<div class="modal-content-1 hide">
<!--#INCLUDE FILE=" Products/Item_1.asp"-->
</div>
<div class="modal-content-2 hide">
<!--#INCLUDE FILE=" Products/Item_2.asp"-->
</div>
</div>
</div>
</div>
...ETC
<a class="button" href="#" data-open-modal data-modal="1">PREVIEW</a>
<a class="button" href="#" data-open-modal data-modal="2">PREVIEW</a>
...ETC
This is in a LOOP…
<td><%=Rs("id")%></td>
<td>
<a href="#" onclick="NewWindow('<%=rs("PreviewLocation")%>',INFO,'500','600','yes','left'); return false;">PREVIEW</a>
</td>
NOTE:
rs(“PreviewLocation”) is the path to the product ID that’s in the database