lulu50
asked on
where would I put this code???
Hi,
Oh, I have this piece of code that I know it would display 5 names per row. but
I am not sure where to put it here.
so, since my brain is blinking Maybe someone somewhere somehow can help me.
thank you,
lulu
This is the code I want to <br> after 5 names
<cfif currentRow mod 5 eq 0>
Oh, I have this piece of code that I know it would display 5 names per row. but
I am not sure where to put it here.
so, since my brain is blinking Maybe someone somewhere somehow can help me.
thank you,
lulu
This is the code I want to <br> after 5 names
<cfif currentRow mod 5 eq 0>
<CFQUERY DATASOURCE="xxx" NAME="DispMainMenu" cachedwithin="#createTimeSpan(0,0,0,-1)#">
SELECT MainMenuName, MenuID, MainMenuURL, RelIDMainMenu, MainMenuStatus
FROM MainMenu where MainMenuStatus = 'A'
ORDER BY MainMenuOrderBy
</CFQUERY>
<CFQUERY DATASOURCE="xxx" NAME="DispSubMenu" cachedwithin="#createTimeSpan(0,0,0,-1)#">
SELECT MainMenu.MenuID,SubMenuName,SubMenuURL,DivID
FROM MainMenu left join SubMenu on MainMenu.MenuID = SubMenu.MenuID
where SubMenuStatus = 'A'
order by SubMenu.SubMenuName
</CFQUERY>
<tr>
<td colspan="2" ><div id="dolphincontainer">
<div id="dolphinnav">
<ul>
<cfloop query = "DispMainMenu">
<li><cfoutput><a href="#MainMenuURL#" rel="#RelIDMainMenu#"><span>#MainMenuName#</span></a></cfoutput></li>
</cfloop>
</ul>
</div>
<div id="dolphin_inner">
<cfloop query = "DispSubMenu">
<div id="<cfoutput>#DispSubMenu.DivID#</cfoutput>" class="innercontent">
<table>
<tr>
<td> </td>
</tr>
<tr>
<cfif DispMainMenu.MenuID neq "1">
<td style="border-right: 1px solid #adc0d1;border-top: 1px solid #adc0d1;border-left:1px solid #adc0d1;border-bottom: 1px solid #adc0d1;width:150px;height:30px;" background="images/bg.gif">
<a href="#" style="color: #000000" onMouseOver="this.style.color='#93b38e'" onMouseOut="this.style.color='#000000'"><cfoutput>#DispSubMenu.SubMenuName#</cfoutput></a>
</td>
</cfif>
</tr>
</table>
</div>
</cfloop>
</td>
</tr>
look at the previous post, i gave you a drop-in solution that will loop every 5 rows and give you another <tr>
<table>
<cfloop query="DispSubMenu">
<cfif DispSubMenu.currentrow mod 5 or DispSubMenu.currentrow eq 1><tr></cfif>
<td style="border-right: 1px solid #adc0d1;border-top: 1px solid #adc0d1;border-left:1px solid #adc0d1;border-bottom: 1px solid #adc0d1;width:150px;height:30px;" background="images/bg.gif">
<a href="#" style="color: #000000" onMouseOver="this.style.color='#93b38e'" onMouseOut="this.style.color='#000000'"><cfoutput>#DispSubMenu.SubMenuName#</cfoutput></a>
</td>
<cfif currentrow mod 5 or DispSubMenu.currentrow eq DispSubMenu.recordcount></tr></cfif>
</cfloop>
</table>
ASKER
cfEngineers:
I tried it but it displayed all my records name horizontal like this.
Antiques
Any Real Estate
Building Lot
Co-op Unit
Condominium Unit
Duplex
Farm
Housing swap
Mobile/Manufactured Home
Multi-Family Home
Offie/Commercial
Parking/Storage
Raw Land
Rooms/Shared
Row House
Single Family Home
Sublets/Temporary
Townhouse/Townhome
Vacation Rentals
Vacation swap
but what I want is something like this.
Antiques Any Real Estate Building Lot Co-op Unit Condominium Unit
Duplex Farm Housing swap Mobile/Manufactured Home Multi-Family Home
Offie/Commercial Parking/Storage Raw Land Rooms/Shared Row House
Single Family Home Sublets/Temporary Townhouse/Townhome Vacation Rentals Vacation swap
I tried it but it displayed all my records name horizontal like this.
Antiques
Any Real Estate
Building Lot
Co-op Unit
Condominium Unit
Duplex
Farm
Housing swap
Mobile/Manufactured Home
Multi-Family Home
Offie/Commercial
Parking/Storage
Raw Land
Rooms/Shared
Row House
Single Family Home
Sublets/Temporary
Townhouse/Townhome
Vacation Rentals
Vacation swap
but what I want is something like this.
Antiques Any Real Estate Building Lot Co-op Unit Condominium Unit
Duplex Farm Housing swap Mobile/Manufactured Home Multi-Family Home
Offie/Commercial Parking/Storage Raw Land Rooms/Shared Row House
Single Family Home Sublets/Temporary Townhouse/Townhome Vacation Rentals Vacation swap
ASKER
<tr>
<td colspan="2" >
<div id="dolphincontainer">
<div id="dolphinnav">
<ul>
<cfloop query = "DispMainMenu">
<li><cfoutput><a href="#MainMenuURL#" rel="#RelIDMainMenu#"><spa n>#MainMen uName#</sp an></a></c foutput></ li>
</cfloop>
</ul>
</div>
<cfloop query = "DispMainMenu">
<CFQUERY DATASOURCE="xx" NAME="DispSubMenu" cachedwithin="#createTimeS pan(0,0,0, -1)#">
SELECT MainMenu.MenuID,SubMenuNam e,SubMenuU RL,DivID
FROM MainMenu left join SubMenu on MainMenu.MenuID = SubMenu.MenuID
where SubMenuStatus = 'A'
and MainMenu.MenuID = #val(DispMainMenu.menuID)#
order by SubMenu.SubMenuName
</CFQUERY>
<div id="Div1">
<div id="<cfoutput>#RelIDMainMe nu#</cfout put>" class="innercontent">
<table>
<cfloop query="DispSubMenu">
<cfif DispSubMenu.currentrow mod 5 or DispSubMenu.currentrow eq 1><tr></cfif>
<td style="border-right: 1px solid #adc0d1;border-top: 1px solid #adc0d1;border-left:1px solid #adc0d1;border-bottom: 1px solid #adc0d1;width:150px;height :30px;" background="images/bg.gif" >
<a href="#" style="color: #000000" onMouseOver="this.style.co lor='#93b3 8e'" onMouseOut="this.style.col or='#00000 0'"><cfout put>#DispS ubMenu.Sub MenuName#< /cfoutput> </a>
</td>
<cfif currentrow mod 5 or DispSubMenu.currentrow eq DispSubMenu.recordcount></ tr></cfif>
</cfloop>
</table>
</div>
</div>
</cfloop>
</td>
</tr>
<td colspan="2" >
<div id="dolphincontainer">
<div id="dolphinnav">
<ul>
<cfloop query = "DispMainMenu">
<li><cfoutput><a href="#MainMenuURL#" rel="#RelIDMainMenu#"><spa
</cfloop>
</ul>
</div>
<cfloop query = "DispMainMenu">
<CFQUERY DATASOURCE="xx" NAME="DispSubMenu" cachedwithin="#createTimeS
SELECT MainMenu.MenuID,SubMenuNam
FROM MainMenu left join SubMenu on MainMenu.MenuID = SubMenu.MenuID
where SubMenuStatus = 'A'
and MainMenu.MenuID = #val(DispMainMenu.menuID)#
order by SubMenu.SubMenuName
</CFQUERY>
<div id="Div1">
<div id="<cfoutput>#RelIDMainMe
<table>
<cfloop query="DispSubMenu">
<cfif DispSubMenu.currentrow mod 5 or DispSubMenu.currentrow eq 1><tr></cfif>
<td style="border-right: 1px solid #adc0d1;border-top: 1px solid #adc0d1;border-left:1px solid #adc0d1;border-bottom: 1px solid #adc0d1;width:150px;height
<a href="#" style="color: #000000" onMouseOver="this.style.co
</td>
<cfif currentrow mod 5 or DispSubMenu.currentrow eq DispSubMenu.recordcount></
</cfloop>
</table>
</div>
</div>
</cfloop>
</td>
</tr>
OK I am heading home, I will take a look at it later to see if I can conjure up something.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you