RE: cfquery within javascript

2010-04-14 Thread Sebastiaan GMC van Dijk

Couldn't you just say:




[...] cflogic [...]



Sebastiaan
=
So long and thanx 4 all the fish

==> Onlinebase.nl

 

> -Original Message-
> From: fun and learning [mailto:funandlrnn...@gmail.com] 
> Sent: Thursday, 15 April 2010 6:13 AM
> To: cf-talk
> Subject: cfquery within javascript
> 
> 
> hi,
> 
> I am trying to do the following:
> 
> I wrote a cfquery within javascript function as below:
> 
> 
> <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>
>   
> 
> 
> 
> 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...
> 
> 
> 
> 
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332890
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: cfquery within javascript

2010-04-14 Thread Andrew Scott

Any reason you are doing it this way and not just no javascript and use
cfdump instead?


-Original Message-
From: fun and learning [mailto:funandlrnn...@gmail.com] 
Sent: Thursday, 15 April 2010 6:13 AM
To: cf-talk
Subject: cfquery within javascript


hi,

I am trying to do the following:

I wrote a cfquery within javascript function as below:


<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>
  



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...




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332889
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: cfquery within javascript

2010-04-14 Thread Robert Harrison

What are you trying to show. If you want a literal put your alert results in
quotes. alert("#query2.RecordCount#");

Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged



-Original Message-
From: fun and learning [mailto:funandlrnn...@gmail.com] 
Sent: Wednesday, April 14, 2010 4:13 PM
To: cf-talk
Subject: cfquery within javascript


hi,

I am trying to do the following:

I wrote a cfquery within javascript function as below:


<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>
  



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...




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332888
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


cfquery within javascript

2010-04-14 Thread fun and learning

hi,

I am trying to do the following:

I wrote a cfquery within javascript function as below:


<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>
  



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...


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332887
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm