This works in IE perfectly as shown in the first screen shot but in the second screen shot (firefox) its having a lot of problems as you can see.
[code]<script language=”JavaScript”>
//INITS
if (navigator.appName == “Netscape”) {
layerRef=”document.layers”;
styleSwitch=””;
}else{
layerRef=”document.all”;
styleSwitch=”.style”;
}
//HIDING AND SHOWING LAYER CODE
function showLayer(layerName, layerIndex)
{
layerIndexInsert = “”;
if (layerIndex != null)
{
layerIndexInsert = “[” + layerIndex.toString() + “]”;
}
eval(layerRef+'[“‘+layerName+'”]’+layerIndexInsert+styleSwitch+’.display=”block”‘);
}
function hideLayer(layerName, layerIndex)
{
layerIndexInsert = “”;
if (layerIndex != null)
{
layerIndexInsert = “[” + layerIndex.toString() + “]”;
}
eval(layerRef+'[“‘+layerName+'”]’+layerIndexInsert+styleSwitch+’.display=”none”‘);
}
</script>
[code]<script language=”JavaScript”>
function resetBG()
{
<cfLoop query=”getPackageGroups”>
ss<cfoutput>#getPackageGroups.packageGroupID#</cfoutput>.style.backgroundColor=’ffffff’;
</cfloop>
<cfIf adminID NEQ 0>
ss00.style.backgroundColor=’ffffff’;
</cfif>
<cfIf getOptionalProgramsCount.recordCount NEQ 0>
ss0.style.backgroundColor=’ffffff’;
</cfif>
}
function selectClick(radioSelected, rowID, fee, recordID)
{
//alert(recordID);
resetBG();
document.frmMyEventPackage.packageGroupID[radioSelected].checked=true;
rowID.style.backgroundColor=’ffffd9′;
//total = total – currentPackageGroupFee;
//total = total + fee;
total = fee;
document.getElementById(‘total’).innerHTML = “$” + formatCurrency(total);
currentPackageGroupFee = fee;
//loop through seArray and hide/show special events based on association
//hide
for (i = 0; i < seArray.length; i++)
{
//hide
//hideLayer(‘layTime’);
passLayerName = ‘seRowA’ + seArray[i][1];
hideLayer(passLayerName);
passLayerName = ‘seRowB’ + seArray[i][1];
hideLayer(passLayerName);
passLayerName = ‘seRowC’ + seArray[i][1];
hideLayer(passLayerName);
passLayerName = ‘seRowD’ + seArray[i][1];
hideLayer(passLayerName);
}
//show
for (i = 0; i < seArray.length; i++)
{
if(seArray[i][0] == recordID)
{
//show
//alert(seArray[i][0] + seArray[i][1]);
passLayerName = ‘seRowA’ + seArray[i][1];
showLayer(passLayerName);
passLayerName = ‘seRowB’ + seArray[i][1];
showLayer(passLayerName);
passLayerName = ‘seRowC’ + seArray[i][1];
showLayer(passLayerName);
passLayerName = ‘seRowD’ + seArray[i][1];
showLayer(passLayerName);
}
}
//if admin is logged on (the Non-Registrant option will be available),
//and the user selects the Non-Registrant option,
//then hide the Special Events and Optional Programs sections
<cfIf adminID NEQ 0>
if(rowID == “ss00”)
{
hideLayer(“optionalProgramsSection”);
hideLayer(“specialEventsSection”);
}
</cfif>
//if optional programs are on this event (the optional programs section will be available),
//and the user selects the Optional Programs Only option,
//then hide the Special Events section
<cfIf getOptionalProgramsCount.recordCount NEQ 0>
if(rowID == “ss0”)
{
hideLayer(“specialEventsSection”);
}
</cfif>
//reset Special Events
resetSE();
//reset Optional Programs
resetOP();
}
//create array with all package groups and their associated special events
var seArray = [ [ “item 0-0”, “item 0-1”],[ “item 1-0”, “item 1-1” ] ];
<cfQuery name=”getPG_SE_xref” datasource=”#sqldb#”>
select packageGroupID, specialEventID
from OMR_xref_SpecialEvents_PG
where packageGroupID in
(select packageGroupID from OMR_PackageGroups where eventID = 8 and status = 1)
order by packageGroupID
</cfquery>
<cfSet varArray = ‘var seArray = [ ‘>
<cfLoop query=”getPG_SE_xref”>
<cfSet varArray = #varArray# & ‘ [ “#getPG_SE_xref.packageGroupID#”, “#getPG_SE_xref.specialEventID#” ]’>
<cfIf getPG_SE_xref.currentRow NEQ getPG_SE_xref.recordCount>
<cfSet varArray = #varArray# & ‘, ‘>
</cfif>
</cfloop>
<cfSet varArray = #varArray# & ‘ ];’>
#varArray#
//alert(seArray[2][1]);
</script>
[url]http://img508.imageshack.us/img508/5870/ie9sq.jpg
[url]http://img508.imageshack.us/img508/4834/firefox1pj.jpg