First table record is repeated when i trie to show content

fedesan 15 Dec, 2009
Hi,
i am trying to create something really similar to the 'FAQs' section of this page
but only the first table record is displayed on each row when i show the content
this is the code:

<hr>
<iframe frameborder=1 id='ebox1' width=100% 
height=100% bgcolor=#808080 style='display: none; position:absolute;
top: 0px; left: 0px;filter:alpha(opacity=0.5);-moz-opacity: 0.5;opacity: 0.5;background-color: #808080;'> 
</iframe>

<form name=frm>
<table id=frm align=center border=0 cellpadding=0 cellspacing=0 bgcolor=white style="border: none; font-size: 18px;">
<tr><td align=left> <A NAME="code" onclick='disp();'>  {titulo}  </A> </td></tr></table></form>

<div id='s' style='display: none; border:thin solid black; border-top:thin solid black; position: absolute; background-color: black;'>
                                           <!--And the problem begins here-->

<div style=" width: auto; height:auto; text-align: right; color:#000099; font-weight: bold;">
<a style='cursor:pointer;color:#ffffff;' onclick='hide()'><b>X </b></a>
</div>

<div align=center id='ad' style="color:#666666; background-color: white; font-weight: bold; font-family: Times New Roman; font-size: 16px;">

<h6>{titulo}</h6> <br>    
<!--observe that in this case {titulo} will show the field of the first table record -->
 
</div>
</div>





<script language=javascript>
var browserName=navigator.appName;
var left_align = 300; // Set the left position to center the greybox
var top_align = 150;  // Set the top position to center the greybox
function disp(){
   if(browserName == "Netscape"){
      var stop = document.documentElement.scrollTop;  
      document.getElementById('ebox1').style.height=document.body.offsetHeight+"px";
	  document.getElementById('s').style.position = "fixed";
	}else{
	  var stop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
      window.onscroll=mveditbox;
   }
   document.getElementById('s').style.display = 'block'; 
   document.getElementById('ebox1').style.display='block'; 
   
   document.getElementById('frm').style.opacity = 5/10;
   document.getElementById('frm').style.filter = 5/10;

   document.getElementById('ebox1').style.zIndex=100; 
   document.getElementById('s').style.zIndex=1000; 
   document.getElementById('ebox1').style.top=stop+"px";

   var top_pos = stop+top_align;   
   document.getElementById('s').style.top= top_pos+"px";	

   var sleft = window.pageXOffset || document.body.scrollLeft || document.documentElement.scrollLeft;
   var left_pos = sleft+left_align;
   document.getElementById('s').style.left= left_pos+"px";
}

function hide(){
   document.getElementById('s').style.display='none';
   document.getElementById('frm').style.opacity = 100;
   document.getElementById('ebox1').style.display='none'; 
}
  
function mveditbox() {
   var stop =window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
   document.getElementById('ebox1').style.top=stop+"px";
   
   var tot = stop+top_align;  
   document.getElementById('s').style.top= tot+"px";	

   document.getElementById('ebox1').style.height = document.body.clientHeight+"px";
}
</script>
<hr>


This issue occurs because i am using JavaScript??
I've also tried something like <?php title=$MyRow->titulo;?> and then Echo $title

I hope somebody could help me.
Greetings from Argentina!!!
GreyHead 15 Dec, 2009
Hi fedesan,

Where are you using this code?

Is it in the ChronoConnectivity Body section?

Or is this a ChronoForm?

Bob
fedesan 15 Dec, 2009
Hi GreyHead,

yes,i'm using the code in the ChronoConnectivity Body section
...is this possible??
if not, what do you recommend me to use in order to get something like the FAQs page

thanks
GreyHead 15 Dec, 2009
Hi fedesan,

I've no idea what youa re trying to do with the code but it certainly won't work in the ChronoConnectivity body box.

The Body Box code is repeated once for each record in the list. Normally it shoudl just contain a single <tr> or possibly <div> or two.
[list]
  • It should not contain any JavaScript (unless it is a snippet that is specific to that display row).
  • Any unclosed <form> tags (and probably no <form> tags at all).
  • Any MySQL queries
  • Any PHP that is not line specific (and even then it needs to be set up carefully).
  • [/list]

    If you need to add a script then call it once from the Header or Footer box.

    Bob
    This topic is locked and no more replies can be posted.