I have a query full of user data that I need to loop through and submit a
form for each one.
I here's a mock-up of what I currently have:
--- snip ---
<!--- first I get the primary keys for all users involved --->
<cfquery name="qryGetPrimaryKeys" datasource="#datasource#">
SELECT primary_key FROM table WHERE field = 'stuff'
</cfquery>
<cfloop query="qryGetPrimaryKeys">
<!--- I loop through the primary key query and get the rest of the info
associated with each primary key, one primary key at a time --->
<cfquery name="qryGetInfoForSingleRecord" datasource="#datasource#">
SELECT whatever1, whatever2, whatever3 FROM table WHERE primary_key
= '#primary_key#'
</cfquery>
<cfoutput query="qryGetInfoForSingleRecord">
<!--- I set the info for each primary key to session variables for
ease of portability --->
<cfset Session.variable1 = '#whatever1#'>
<cfset Session.variable2 = '#whatever2#'>
<cfset Session.variable3 = '#whatever3#'>
</cfoutput>
... ... ... ... ...
</cfloop>
--- snip ---
This is where I run into my problem. What I need to do is find a way to
call the code below through each iteration of the loop.
--- snip ---
<body onload="document.frmThisForm.submit()">
<cfoutput>
<form name="frmThisForm"
action="https://secure.domain.com/cgi-bin/some.cgi" method="POST">
<input type="Hidden" name="txtField1" value="#Session.variable1#">
<input type="Hidden" name="txtField2" value="#Session.variable2#">
<input type="Hidden" name="txtField3" value="#Session.variable3#">
</form>
</cfoutput>
--- snip ---
The page has a JavaScript blurb that submits the form when the page is
loaded. How can I keep track of the looping if I am switching pages? A
hidden frame comes to mind, but how do I target that hidden frame? Also,
since the second page submits a form that loads a 3rd page that is located
off-site, there will be a serious problems with synchronization, I am sure.
Does anyone have a decent way to do this? Does anyone even know what I am
on about? ;)
TIA,
.Todd
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.