Forums
This topic is locked
repeat region with a difference
Posted 27 May 2002 13:36:29
1
has voted
27 May 2002 13:36:29 Rian Carstens posted:
HiI want to create a repeat region with a difference, but dont know how!
Basicly I need to be able to create a variable that represents a list. Understand <img src=../images/dmxzone/forum/icon_smile_question.gif border=0 align=middle>
Thanks
Rian
Replies
Replied 27 May 2002 17:51:32
27 May 2002 17:51:32 Andrew Watson replied:
of course we dont understand....please take a little time to detail your problem and youll get the help you need a lot quicker....
so you want to "Create a variable that represents a list" well if thats all you want to do then here it is.
<pre id=code><font face=courier size=2 id=code>
<%
Dim myVariable
%>
</font id=code></pre id=code>
There you go, ive created a variable and it can represent anything i want.
.....expand a little!
What list, where does it come from, whats the variable for, and why should it represent the list, and where does the repeat come into all this......????
Cheers
Leed
Cheers
:: Son, im Thirty.... ::
so you want to "Create a variable that represents a list" well if thats all you want to do then here it is.
<pre id=code><font face=courier size=2 id=code>
<%
Dim myVariable
%>
</font id=code></pre id=code>
There you go, ive created a variable and it can represent anything i want.
.....expand a little!
What list, where does it come from, whats the variable for, and why should it represent the list, and where does the repeat come into all this......????
Cheers
Leed
Cheers
:: Son, im Thirty.... ::
Replied 27 May 2002 21:04:59
27 May 2002 21:04:59 David Behan replied:
Your right there leed.... my words where.... WHAT?
_________________________
David Behan - www.site-manager.com/af.asp?a=11&l=1tds9p6x2
_________________________
David Behan - www.site-manager.com/af.asp?a=11&l=1tds9p6x2
Replied 28 May 2002 14:48:41
28 May 2002 14:48:41 Rian Carstens replied:
ok, I'll admit, when I reread it I also thought WHAT?
Here goes again, this time ive had sleep.
I have a database table that has a list of names. I want to create a repeat region on my page representing my list of names.
My repeat region however needs to be inside another tag "MARQUEE"?!
<Marquee>name 1, name 2, name 3, name 4, etc... .... .... ... ..</Marquee>
How do I create this dynamic list of names so that it would scroll accross the screen and be updated automaticaly by the database?
Understand now? I hope so, cause I still dont.
Cheers
Rian
Here goes again, this time ive had sleep.
I have a database table that has a list of names. I want to create a repeat region on my page representing my list of names.
My repeat region however needs to be inside another tag "MARQUEE"?!
<Marquee>name 1, name 2, name 3, name 4, etc... .... .... ... ..</Marquee>
How do I create this dynamic list of names so that it would scroll accross the screen and be updated automaticaly by the database?
Understand now? I hope so, cause I still dont.
Cheers
Rian
Replied 28 May 2002 15:20:41
28 May 2002 15:20:41 Andrew Watson replied:
Hello Rian, im not sure but this may get you going in the right direction...
this code is a tweaked repeat region, that will create a string (myString) that contains all your recordset rows seperated by commas and a space...
<pre id=code><font face=courier size=2 id=code> <%'build a string with a recordset
Dim myString
myString = ""
While ((Repeat1__numRows <> 0) AND (NOT rsProducts.EOF))
myString = myString & rsProducts.Fields.Item("ProductName".Value & ", "
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsProducts.MoveNext()
Wend
%>
</font id=code></pre id=code>
Pop this after your recordset code then you just need to stick the cariable (myString) into your page....
If you need to create the tags <Marquee> as well then just build more strings.
Hope this helps you....If it dont then get back to me.
Cheers,
Leed.
<img src=../images/dmxzone/forum/icon_smile_8ball.gif border=0 align=middle>
:: Son, im Thirty.... ::
this code is a tweaked repeat region, that will create a string (myString) that contains all your recordset rows seperated by commas and a space...
<pre id=code><font face=courier size=2 id=code> <%'build a string with a recordset
Dim myString
myString = ""
While ((Repeat1__numRows <> 0) AND (NOT rsProducts.EOF))
myString = myString & rsProducts.Fields.Item("ProductName".Value & ", "
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsProducts.MoveNext()
Wend
%>
</font id=code></pre id=code>
Pop this after your recordset code then you just need to stick the cariable (myString) into your page....
If you need to create the tags <Marquee> as well then just build more strings.
Hope this helps you....If it dont then get back to me.
Cheers,
Leed.
<img src=../images/dmxzone/forum/icon_smile_8ball.gif border=0 align=middle>
:: Son, im Thirty.... ::
Replied 28 May 2002 15:23:12
28 May 2002 15:23:12 Rian Carstens replied:
Thanks leed, I'll try it now, I appreciate it.
Rian
Rian
Replied 28 May 2002 15:28:06
28 May 2002 15:28:06 Rian Carstens replied:
Thanx leed, it works, I knew I was going in the right direction, the only thing was putting the recordset in one string.
Thanks again
Rian
Thanks again
Rian