View Single Post
Old 12-18-2010, 03:10 PM   PM User | #1
TheQuestor
New to the CF scene

 
Join Date: Jun 2009
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
TheQuestor is an unknown quantity at this point
I'm completely javascript illiterate so please help

Code:
<%Function PF(num)%>
<script type="text/javascript">
 <!--
 function toggleOff()
 {
 document.getElementById("floatingBox").style.display = "none";
 }
 //-->
 </script>
<div class="post_header" onClick="ToggleReply( <%=num%> )">
<div class="post_pmbutton" id="button_<%=num%>">[+]</div>
<br clear="all">
</div>
<div class="post_content" style="display: none;" id="content_<%=num%>">
<div id="floatingBox">some words here
<a href="#&ID=<%=num%>" title="Close this box" onclick="javascript: toggleOff();">[I Agree]</a>
 </div></div>
<%End Function%>
It works fine, as long as it's the only one on the page. Problem is I potentially could have many dozens on any given page and the top one always works but the ones after do not

I understand that I basically need to set a variable that is different for each rendition of the code but that is where I am stumped.
I have a message ID from vb that I can pass to the javascript to get each iteration a unique ID I just don't know what to do with the number in javascript. I have NO clue about javascript

Each iteration is hidden by default until an anchor is clicked.


Please help clue this poor soul in

Last edited by TheQuestor; 12-18-2010 at 03:15 PM.. Reason: put the stupid [/CODE] in the wrong place :(
TheQuestor is offline   Reply With Quote