Solved

repeat region

Posted on 2003-11-10
9
423 Views
Last Modified: 2010-04-25
I've designed my webpage with the following layout:

product 1    Product 2


How can I setup a repeat region so that both products are next to each other? everytime I try I end up with:

Product 1   Product
Product 2   Product
Product 3   Product
Product 4   Product

I need something like:

Product 1   Product 2
Product 3   Product 4
Product 5   Product 6
Product 7   Product 8


is this possible?? :(



0
Comment
Question by:stuayre
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 1

Expert Comment

by:gabss
Comment Utility
hi,

a fast way i can think of is to do 2 seperate tables with 2 seperate recordsets..

this is a Fast way .....

odd in one Recordset evens in the other....

will be better ways but this would be a quick fix and not to complex...

G





0
 
LVL 23

Accepted Solution

by:
adilkhan earned 130 total points
Comment Utility
gabss I have to disagree with you, you are saying double the Page Load time and resources. if you want it to act as a quick fix maybe it will for you.

any experience with asp?
if yes then you can use the MOD operator

set up a variable before the LOOP

j = 1

then in the LOOP do this

if j MOD 2 = 1 then
"</td><td>"
j = j+1
next

so, we defined a variable and then we increasing the value of that variable everytime it loops through the records, MOd function will take care of the MATH, if j is divided by 2 then Close the Table Cell and OPEN the new CELL, so you might have to play with HTML a little but.

Let me know if you ned help.



0
 
LVL 1

Expert Comment

by:gabss
Comment Utility
hay adilkhan

quick fix only as stated.....


I am asumming use of DW dialog boxes and Auto record sets....
Not just ASP only.....

Sorry if this put u off stuayre

leave in hands adilkhan

G
0
 
LVL 23

Expert Comment

by:adilkhan
Comment Utility
I agree with you gabss, we are dealing with DW, But sometimes we can not do everything and count on Editiors:). I am sure you had that experience as well.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 16

Expert Comment

by:jaysolomon
Comment Utility
is this what you need

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.odd{
      border-right: 1px solid black;
      padding-right: 6px;
}
.even{
      padding-left: 5px;
}
div{
      border: 1px solid black;
      width: 200px;
      text-align: center;
}
-->
</style>
</head>
<body>
<div>
<span class="odd">Product 1</span>
      <span class="even">Product 2</span><br />
<span class="odd">Product 3</span>
      <span class="even">Product 4</span><br />
<span class="odd">Product 5</span>
      <span class="even">Product 6</span><br />
<span class="odd">Product 7</span>
      <span class="even">Product 8</span>
</div>
</body>
</html>
0
 
LVL 23

Expert Comment

by:adilkhan
Comment Utility
jAy I believe we are dealing with data Handling here not Client Side, maybe we all got it wrong:)
0
 
LVL 16

Expert Comment

by:jaysolomon
Comment Utility
hmm

Never seen anything about it in the Q.

*shaking head*
   *i am so confused*
0
 
LVL 1

Author Comment

by:stuayre
Comment Utility
thanks adilkhan that worked a treat :)

0
 
LVL 2

Expert Comment

by:danalmar
Comment Utility
hi,
try this, suppose that you have a recordset RS from your database;
first you define your looper:
***********************************************
<%
Dim HLooper1__numRows
HLooper1__numRows = -2
Dim HLooper1__index
HLooper1__index = 0
RS_numRows = RS_numRows + HLooper1__numRows
%>
***********************************************
and now you just put your table with the recordset fields:
***********************************************
<table>
  <%
startrw = 0
endrw = HLooper1__index
numberColumns = 2
numrows = -1
while((numrows <> 0) AND (Not RS.EOF))
      startrw = endrw + 1
      endrw = endrw + numberColumns
 %>
  <tr align="center" valign="top">
    <%
While ((startrw <= endrw) AND (Not RS.EOF))
%>
    <td> <%=(RS.Fields.Item("Product").Value)%> </td>
    <%
      startrw = startrw + 1
      RS.MoveNext()
      Wend
      %>
  </tr>
  <%
 numrows=numrows-1
 Wend
 %>
</table>
***********************************************
if you want more simple, try to get the Horizontal Looper Extensions for DW from MM website

hope helpe you,
dan
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now