Dear reader ... read the following CF code please:
<CFQUERY DATASOURCE="DS" NAME="QMaxID">
Select Max(ID) As MaxID From Messages
</CFQUERY>
<CFQUERY DATASOURCE="DS" NAME="QMinID">
Select Min(ID) As MinID From Messages
</CFQUERY>
<CFQUERY DATASOURCE="DS" NAME="QMessage">
Select ID, Message From Messages
</CFQUERY>
<CFOUTPUT QUERY="QMaxID">
<INPUT TYPE="hidden" VALUE="MaxID" NAME="TxtMaxID"
</CFOUTPUT>
<CFOUTPUT QUERY="QMinID">
<INPUT TYPE="hidden" VALUE="MinID" NAME="TxtMinID"
</CFOUTPUT>
<CFOUTPUT QUERY="QMessage">
<INPUT TYPE="hidden" VALUE="#Message#" NAME="Txt#ID#">
</CFOUTPUT>
<Script Language="JavaScript">
var idx, Max_ID, Min_ID;
var M = new Array();
idx = 0;
Max_ID = Number(this.TxtMaxID.value);
Min_ID = Number(this.TxtMinID.value);
for(i=Min_ID; i<=Max_ID; i++)
{
s = "Txt" + i;
M[idx] = this.s.value;
idx++;
}
</Script>
I know that this.s.value doesn't work, but I write it down to show you what I need to do.
So, can you help me?!!!
<CFQUERY DATASOURCE="DS" NAME="QMaxID">
Select Max(ID) As MaxID From Messages
</CFQUERY>
<CFQUERY DATASOURCE="DS" NAME="QMinID">
Select Min(ID) As MinID From Messages
</CFQUERY>
<CFQUERY DATASOURCE="DS" NAME="QMessage">
Select ID, Message From Messages
</CFQUERY>
<CFOUTPUT QUERY="QMaxID">
<INPUT TYPE="hidden" VALUE="MaxID" NAME="TxtMaxID"
</CFOUTPUT>
<CFOUTPUT QUERY="QMinID">
<INPUT TYPE="hidden" VALUE="MinID" NAME="TxtMinID"
</CFOUTPUT>
<CFOUTPUT QUERY="QMessage">
<INPUT TYPE="hidden" VALUE="#Message#" NAME="Txt#ID#">
</CFOUTPUT>
<Script Language="JavaScript">
var idx, Max_ID, Min_ID;
var M = new Array();
idx = 0;
Max_ID = Number(this.TxtMaxID.value);
Min_ID = Number(this.TxtMinID.value);
for(i=Min_ID; i<=Max_ID; i++)
{
s = "Txt" + i;
M[idx] = this.s.value;
idx++;
}
</Script>
I know that this.s.value doesn't work, but I write it down to show you what I need to do.
So, can you help me?!!!