Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

getElementById-coldfusion

I have a form object that contains a list of items in it.I want to loop over it and get each item and then update the in db..but below code doesnt do it..smth is not right ? any help will be app..Thx all.

<input name="act" type="text" size="10" maxlength="20" style="height:19px; font-family:Arial, Helvetica, sans-serif" value="" id="#f1#|#f2#"/>
sample:
Form.act={BBT|10A-10P,CB|10A-10P,BBT|10P-10A,...etc}

code
+++++++++++++++++

<cfloop index="q" from="1" to="#listlen(Form.act)#">
<cfset actFn=listgetat(Form.act,q)>
<cfif actFn neq "">
<cfSCRIPT>

function get(){var oVDiv="";
// Returns the first DIV element in the collection.
oVDiv=getElementById("Form.act").value;
return oVDiv;

}
</cfSCRIPT>

<!--<cfset Fac=listgetat(Form.actV,q)>
<cfset Fc=listgetat(get(),1,"|")>
<cfset Fs=listgetat(get(),2,"|")>

<cfquery name="gethomefacTmp" datasource="#FormVector#">
update GENBID_BIDRESULT
set
ActName='#actFn#'

where facname='#Fc#' and facsch= '#Fs#'

</cfquery-->

</cfif>

</cfloop> :mad:
[1258 byte] By [emmim44] at [2007-11-11 10:12:51]