We help IT Professionals succeed at work.
Get Started

How to fix this jquery fancybox/loop problem?

marcoloppo
marcoloppo asked
on
1,185 Views
Last Modified: 2013-11-11
Hi,

I have a recordset loop in ASP, and when someone click in some row of this loop table, it launchs a fancybox iframe with some detailed information, when I click in the first item of the loop table the launchbox opens fine, but when I click in any other row below, it does not work. I believe the problem is something about the ID value (pergunta) of the link , I'm using the same ID to all rows to launchl the fancybox iframe, but I don't know how could I fix this, anyone may help?

Thanks
<script>
$("#pergunta").fancybox({
        'padding'      : 0,
        'autoScale'    : false,
        'width'	     : 650,
        'height'	     : 500,		
        'transitionIn'  : 'none',
        'transitionOut' : 'none',
        'centerOnScroll' : true,
	'type'          : 'iframe'
	});
</script>

<%
 while RS3.eof = false
%>

<div class="pane spam">
<h3 class="destaque-laranja-1"><%=left(ConverterDataOut(RS3("data")),10)%> - <%=RS3("nome")%> pergunta:</h3>
<p class="texto-geral-1"><%=RS3("texto")%></p>
<p class="texto-geral-2"><a id="pergunta" href="ver-resposta.asp?cod=<%=RS3("cod")%>&cod_pergunta=<%=RS3("cod_pergunta")%>" class="btn-unapprove">RESPOSTA COMPLETA</a></p>
 </div>

<%
RS3.movenext
wend
%>

Open in new window

Comment
Watch Question
This problem has been solved!
Unlock 2 Answers and 6 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE