Stretchwickster
Programmer
Hi,
I've got an XML file which I am calling from an HTML page and it shows one item of the XML file at a time. I have controls to move forwards and backwards through the XML recordset. What I want to be able to do is randomly display a record each time the HTML page is opened/refreshed. Can anyone give me a clue as to how I can achieve this?
My current code is as follows:
Clive![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
I've got an XML file which I am calling from an HTML page and it shows one item of the XML file at a time. I have controls to move forwards and backwards through the XML recordset. What I want to be able to do is randomly display a record each time the HTML page is opened/refreshed. Can anyone give me a clue as to how I can achieve this?
My current code is as follows:
Code:
<XML ID="Quotes" SRC="Quotes.xml"> </XML>
<TABLE ALIGN=center CELLPADDING="5" BORDER="0">
<TR>
<TD> <IMG SRC="PreviousButton.jpg" OnClick="Quotes.recordset.MovePrevious();
if(Quotes.recordset.BOF)
Quotes.recordset.MoveNext()"> </TD>
<TD>
<TABLE>
<TR><TD><B><SPAN DATASRC="#Quotes" DATAFLD="TEXT"></SPAN></B></TD></TR>
<TR><TD></TD></TR>
<TR><TD><B><SPAN DATASRC="#Quotes" DATAFLD="PASSAGE"></SPAN></B></TD></TR>
</TABLE>
</TD>
<TD> <IMG SRC="NextButton.jpg" OnClick="Quotes.recordset.MoveNext();
if(Quotes.recordset.EOF)
Quotes.recordset.MovePrevious()"> </TD>
</TR>
</TABLE>
Clive
![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096