Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use [this.s.value] ... where is string.?

Status
Not open for further replies.

Ekrami

Programmer
Joined
Nov 22, 2000
Messages
3
Location
AE
Dear reader ... read the following CF code please:

<CFQUERY DATASOURCE=&quot;DS&quot; NAME=&quot;QMaxID&quot;>
Select Max(ID) As MaxID From Messages
</CFQUERY>

<CFQUERY DATASOURCE=&quot;DS&quot; NAME=&quot;QMinID&quot;>
Select Min(ID) As MinID From Messages
</CFQUERY>

<CFQUERY DATASOURCE=&quot;DS&quot; NAME=&quot;QMessage&quot;>
Select ID, Message From Messages
</CFQUERY>

<CFOUTPUT QUERY=&quot;QMaxID&quot;>
<INPUT TYPE=&quot;hidden&quot; VALUE=&quot;MaxID&quot; NAME=&quot;TxtMaxID&quot;
</CFOUTPUT>

<CFOUTPUT QUERY=&quot;QMinID&quot;>
<INPUT TYPE=&quot;hidden&quot; VALUE=&quot;MinID&quot; NAME=&quot;TxtMinID&quot;
</CFOUTPUT>

<CFOUTPUT QUERY=&quot;QMessage&quot;>
<INPUT TYPE=&quot;hidden&quot; VALUE=&quot;#Message#&quot; NAME=&quot;Txt#ID#&quot;>
</CFOUTPUT>

<Script Language=&quot;JavaScript&quot;>

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 = &quot;Txt&quot; + 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?!!!
 
What are you trying to achieve in the for loop??

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top