#getItems.title[currentRow]#
unless you're looping over the query data using <cfoutput
query="getItems">, i don't believe the 'currentrow' variable will be
available.
but i'm not sure you're trying to use *that* currentrow variable.
looks like you're trying to use an argument passed in to the
javascript function... which CF won't recognize. JS doesn't do "its
thing" until CF is long since done.
if i understand correctly what you are looking to do... you could
create a javascript array using CF, and reference the array in your
function.
<script type="text/javascript">
var myJSArray = new
Array(<cfoutput>#listQualify(valueList(getItems.title),
"'")#</cfoutput>);
function itemDetails(currentRow) {
document.iDetails.title.value = myJSArray[currentRow];
}
</script>
?
On 6/14/07, Ben S <[EMAIL PROTECTED]> wrote:
> I'm trying to make the following work but CF complains about not having
> variable when it's loading the page. Is there a way to write it so that it
> won't complain?
>
> Thanks in advance.
>
> This is the code that's erroring out:
>
> function itemDetails(currentRow)
> {document.iDetails.title.value =
> "<cfoutput>"#getItems.title[currentRow]#";</cfoutput>";
> }
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2.
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281187
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4