Link to home
Start Free TrialLog in
Avatar of webdork
webdork

asked on

Display message every 10 record

I want to show a graphic amidst my recordset every 10 record
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This can only be accomplished on a refresh.
If you are getting the information from a database (Each Record to display)
Then this is possible.

Give me a minute, and I will provide some code for you.

If you are not wanting the Page to Fresh then that could be a problem.

Carrzkiss
angel.
Can that be done without Refreshing the page?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of webdork
webdork

ASKER

I've got it. Thanks Angel, as always you make me think instead of giving the answer. Thanks Carrzkiss for your efforts, I dont think you quite understood the question.

      <%
        counter = 1
While ((Repeat1__numRows <> 0) AND (NOT rsFAQ.EOF))
%>
            <%
            IF counter > 10 THEN
            counter = 1
            END IF
            %>
            <div class="largeheader"><% IF LastCat  <> rsFAQ.Fields.Item("FAQType").Value THEN response.write rsFAQ.Fields.Item("FAQType").Value END IF %></div>
            <div class="faqbold"><%=(rsFAQ.Fields.Item("Question").Value)%>
          </div>
            <div class="faq">
            <%=(rsFAQ.Fields.Item("Answer").Value)%></div>
            <%IF counter = 10 THEN%>
        <a href="faq.asp#top"><img src="images/go_top.gif" alt="To Top" width="19" height="19" border="0"></a>
        <%END IF%>
        <%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  LastCat = rsFAQ.Fields.Item("FAQType").Value
  counter = counter +1
  rsFAQ.MoveNext()
Wend
%>
webdork:
Strange, But I cannot get your code to work?
No error, just will not display nothing to the page.
Source code shows nothing...


And sorry that I did not understand it fully.
But would like to see what the working script does though.

It is always a good thing to continue learning.

Carrzkiss
Avatar of webdork

ASKER

carrzkiss:

you can see the page here: http://206.196.20.10/frenchgold/faq.asp

I changed the counter display and reset to 5.

WD
nice layout. Beautiful work.

But what am I looking for on the page?
I know that you have this:

<%IF counter = 10 THEN%>
        <a href="faq.asp#top"><img src="images/go_top.gif" alt="To Top" width="19" height="19" border="0"></a>
        <%END IF%>

But, I am lost as to what it is suppose to be doing here.
Avatar of webdork

ASKER

Thanks,

I changed the condition to IF counter = 5. So the small gray upointing graphic (this is the classic to the top link) displays every 5th FAQ.
Every 10 Records......
OK, I feel foolish now. Dag.. Totaly blew on that one.

Good concept, Good idea as well.

I am so sorry that I did not understand the question, and I am so sorry that I did NOT read it properly.
I thought it read : Display record every 10 seconds.

Sorry.
Keep up the great job and may the site be a success, as it looks like it already is one.

Carrzkiss