cfquery within javascript
hi,
I am trying to do the following:
I wrote a cfquery within javascript function as below:
<script language="javascript1.2" type="text/javascript">
<cfquery name="query1 datasource="abc">
....
</cfquery>
<cfif query1.recordcount neq "0">
<cfoutput query = "query1">
<cfquery name="query2 datasource="abc">
select * from table1 where name=#query1.name#
</cfquery>
</cfoutput>
alert(<cfoutput>#query2.RecordCount#</cfoutput>);
</cfif>
</script>
The alert value is 1 but the debugging section shows 0, and 0 is the correct value. is there something wrong that I am doing.
If so can you please point out...
