Search the web
Sign In
New User? Sign Up
ajaxcfc · ajaxCFC Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 1524 - 1554 of 1584   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#1554 From: Keith Henderson <head_java@...>
Date: Thu Apr 3, 2008 2:01 pm
Subject: Re: Run a function in a function using ajaxcfc component
head_java
Offline Offline
Send Email Send Email
 
Good Morning,

That's exactly what I determined. The way CF handles
variables as a standard cfm file verses a cfc
component is what threw me off. Thanks for your input,
have a great day.


--- Kevin <chornobyl@...> wrote:

> It looks like the function ones() is not returning
> anything.
>
> It needs a variable to return.
>
> Try this:
>
> <cffunction name="ones">
> <cfargument name="num" type="numeric">
> <cfset var result = "">
> <cfswitch expression="#num#">
> <cfcase value="1"><cfset result = "one"></cfcase>
> <cfcase value="2"><cfset result = "two"></cfcase>
> <cfcase value="3"><cfset result = "three"></cfcase>
> <cfcase value="4"><cfset result = "four"></cfcase>
> <cfcase value="5"><cfset result = "five"></cfcase>
> <cfcase value="6"><cfset result = "six"></cfcase>
> <cfcase value="7"><cfset result = "seven"></cfcase>
> <cfcase value="8"><cfset result = "eight"></cfcase>
> <cfcase value="9"><cfset result = "nine"></cfcase>
> </cfswitch>
> <cfreturn result>
> </cffunction>
>
> On Wed, Apr 2, 2008 at 11:21 AM, Keith
> <head_java@...> wrote:
>
> >   Good Morning,
> >
> > I located a cfm program to convert numeric to
> words. 1 = one, 2 =
> > two etc. I'm trying to run this as a ajaxcfc
> component but when I do
> > a cfset results = #ones(thisNum)# (ones is a
> function within the
> > ajaxcfc component) javascript chokes on the
> returned value with
> > Object doesn't support this property or method. I
> think running the
> > function in the cfset is the cause. A shorten
> version of the
> > component is listed below:
> >
> > <cfcomponent extends="/AjaxCFC/ajax">
> >
> > <cffunction name="getLiteralDays">
> > <cfargument name="days" required="yes"
> type="numeric">
> > <cfset thisNum = #arguments.days#>
> > <cfset results = "">
> > <cfif len(thisNum) lt 2>
> > <cfset results = #ones(thisNum)#>
> > </cfif>
> > <cfreturn results />
> > </cffunction>
> >
> > <cffunction name="ones">
> > <cfargument name="num" type="numeric">
> > <cfswitch expression="#num#">
> > <cfcase value="1">one</cfcase>
> > <cfcase value="2">two</cfcase>
> > <cfcase value="3">three</cfcase>
> > <cfcase value="4">four</cfcase>
> > <cfcase value="5">five</cfcase>
> > <cfcase value="6">six</cfcase>
> > <cfcase value="7">seven</cfcase>
> > <cfcase value="8">eight</cfcase>
> > <cfcase value="9">nine</cfcase>
> > </cfswitch>
> > </cffunction>
> > </cfcomponent>
> >
> > Not sure how else to do this using ajaxcfc. Any
> suggestion would be
> > great. Thanks.
> >
> >
> >
>



      
________________________________________________________________________________\
____
You rock. That's why Blockbuster's offering you one month of Blockbuster Total
Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

#1553 From: Kevin <chornobyl@...>
Date: Thu Apr 3, 2008 3:20 am
Subject: Re: Run a function in a function using ajaxcfc component
lbretail22
Offline Offline
Send Email Send Email
 
It looks like the function ones() is not returning anything.
 
It needs a variable to return.
 
Try this:
 
<cffunction name="ones">
<cfargument name="num" type="numeric">
<cfset var result = "">
<cfswitch expression="#num#">
<cfcase value="1"><cfset result = "one"></cfcase>
<cfcase value="2"><cfset result = "two"></cfcase>
<cfcase value="3"><cfset result = "three"></cfcase>
<cfcase value="4"><cfset result = "four"></cfcase>
<cfcase value="5"><cfset result = "five"></cfcase>
<cfcase value="6"><cfset result = "six"></cfcase>
<cfcase value="7"><cfset result = "seven"></cfcase>
<cfcase value="8"><cfset result = "eight"></cfcase>
<cfcase value="9"><cfset result = "nine"></cfcase>
</cfswitch>
<cfreturn result>
</cffunction>

On Wed, Apr 2, 2008 at 11:21 AM, Keith <head_java@...> wrote:

Good Morning,

I located a cfm program to convert numeric to words. 1 = one, 2 =
two etc. I'm trying to run this as a ajaxcfc component but when I do
a cfset results = #ones(thisNum)# (ones is a function within the
ajaxcfc component) javascript chokes on the returned value with
Object doesn't support this property or method. I think running the
function in the cfset is the cause. A shorten version of the
component is listed below:

<cfcomponent extends="/AjaxCFC/ajax">

<cffunction name="getLiteralDays">
<cfargument name="days" required="yes" type="numeric">
<cfset thisNum = #arguments.days#>
<cfset results = "">
<cfif len(thisNum) lt 2>
<cfset results = #ones(thisNum)#>
</cfif>
<cfreturn results />
</cffunction>

<cffunction name="ones">
<cfargument name="num" type="numeric">
<cfswitch expression="#num#">
<cfcase value="1">one</cfcase>
<cfcase value="2">two</cfcase>
<cfcase value="3">three</cfcase>
<cfcase value="4">four</cfcase>
<cfcase value="5">five</cfcase>
<cfcase value="6">six</cfcase>
<cfcase value="7">seven</cfcase>
<cfcase value="8">eight</cfcase>
<cfcase value="9">nine</cfcase>
</cfswitch>
</cffunction>
</cfcomponent>

Not sure how else to do this using ajaxcfc. Any suggestion would be
great. Thanks.



#1552 From: "Keith" <head_java@...>
Date: Wed Apr 2, 2008 3:21 pm
Subject: Run a function in a function using ajaxcfc component
head_java
Offline Offline
Send Email Send Email
 
Good Morning,

I located a cfm program to convert numeric to words. 1 = one, 2 =
two etc. I'm trying to run this as a ajaxcfc component but when I do
a cfset results = #ones(thisNum)# (ones is a function within the
ajaxcfc component) javascript chokes on the returned value with
Object doesn't support this property or method. I think running the
function in the cfset is the cause. A shorten version of the
component is listed below:

<cfcomponent extends="/AjaxCFC/ajax">

<cffunction name="getLiteralDays">
<cfargument name="days" required="yes" type="numeric">
<cfset thisNum = #arguments.days#>
<cfset results = "">
<cfif len(thisNum) lt 2>
     <cfset results = #ones(thisNum)#>
</cfif>
<cfreturn results />
</cffunction>

<cffunction name="ones">
	 <cfargument name="num" type="numeric">
	 <cfswitch expression="#num#">
		 <cfcase value="1">one</cfcase>
		 <cfcase value="2">two</cfcase>
		 <cfcase value="3">three</cfcase>
		 <cfcase value="4">four</cfcase>
		 <cfcase value="5">five</cfcase>
		 <cfcase value="6">six</cfcase>
		 <cfcase value="7">seven</cfcase>
		 <cfcase value="8">eight</cfcase>
		 <cfcase value="9">nine</cfcase>
	 </cfswitch>
</cffunction>
</cfcomponent>

Not sure how else to do this using ajaxcfc. Any suggestion would be
great. Thanks.

#1551 From: john.mcdonald@...
Date: Wed Mar 12, 2008 9:16 pm
Subject: John McDonald is out of the office.
john_mcdonal...
Offline Offline
Send Email Send Email
 
I will be out of the office starting  03/12/2008 and will not return until
03/18/2008.

I will respond to your message when I return.
If your issue is urgent, you may want to contact the Seagate IT HelpDesk,
Or my Boss, Leo Sanchez - 405-324-3475

PHONE: (405)324-3225
WEB:    http://my.seagate.com/tibco/helpdesk

Thanks
John McDonald

#1550 From: "josegura93" <jsegura01@...>
Date: Wed Mar 12, 2008 8:49 pm
Subject: ajaxcfc + jquery reuse
josegura93
Offline Offline
Send Email Send Email
 
New to js and wanted to know what's the best way to reuse an ajaxcfc
request if this possible.  I want to setup a page with  multiple
selects and detail table.  Once the first select/option is selected a
call is made to populate the second which also populates a table.

I'm guess I could create a var which holds the .AjaxCFC function.  I
just don't know the proper syntax to do so and be able to pass url,
method, data and success.

Hope this makes sense. Can someone please help?

JS.

#1549 From: Chris Jordan <cjordan@...>
Date: Sat Mar 8, 2008 4:17 am
Subject: Re: Re: jquery + AjaxCFC: retrieving data rows
c_s_jordan
Offline Offline
Send Email Send Email
 
cool. I'm glad to hear it! :o)

Chris

----- Original Message -----
From: "josegura93" <jsegura01@...>
To: ajaxcfc@yahoogroups.com
Sent: Friday, March 7, 2008 7:07:18 PM (GMT-0600) America/Chicago
Subject: [ajaxcfc] Re: jquery + AjaxCFC: retrieving data rows

Worked for me. Thanks for clearing it up. I copied the snippet from
your blog early on but forgot to include cfjs. I was hung up trying
to perform the loop via jquery once my first attempt failed so I tried
to get just one row. Your explanation on array notation worked too.

Once again, thanks!

--- In ajaxcfc@yahoogroups.com, Chris Jordan <cjordan@...> wrote:
>
> Man... the formatting on that post just *did not* work out. Yikes!
Sorry.
>
> Chris
> ----- Original Message -----
> From: "Chris Jordan" <cjordan@...>
> To: ajaxcfc@yahoogroups.com
> Sent: Friday, March 7, 2008 3:15:00 PM (GMT-0600) America/Chicago
> Subject: Re: [ajaxcfc] jquery + AjaxCFC: retrieving data rows
>
>
>
>
>
>
>
> How can I not respond? Thanks for the kind words on the tutorials. I
wish they were a little better. :o)
>
> To access particular rows in your dataset (which is probably JSON
encoded), you need to use array notation. This concept of accessing
query results using array notation can also be used inside ColdFusion
so it's actually not too different.
>
> So in your example you've got r.recordcount and r.columnlist and
those hold what you expect. The only thing left is r.data. This holds
your actual data and it's like a struct of arrays, so you would access
the data like this:
>
> r.data.columnname[index]
>
> for instance if you wanted to loop over your dataset (let's call it
myQuery instead of r) like you would in CF you'd do something like this:
>
> 1 var table = "" ;
> 2 table += " <table> " ;
> 3 for(i = 0; i < myQuery.recordcount; i++){ // here we're looping
once for every record
> 4 table += " <tr> "
> 5 for(n = 1; n <= $ .ListLen(myQuery.columnlist); n++){ // once for
every field
> 6 fieldname = $.ListGetAt(myQuery.columnlist, n);
> 7 table += " <td> " + myQuery.data[fieldname][i] + " </td> " ;
> &n bsp;8 }
> 9 table += " </tr> " ;
> 10 }
> 11 table += " </table> " ;
>
> If this looks familiar, it's because I stole it from my own
tutorial. In the above example I'm using CFJS to get $.ListLen() and
$.ListGetAt()
>
> Does this help? If not, let me know exactly what's causing you to
scratch your head, and I'll attempt to help out. :o)
>
> If you curious about the syntax on line 7 where it says:
> myQuery.data[fieldname][i]
>
> An object in JavaScript (an a query object in ColdFusion) can be
access in this way when the member key (the bit that would normally
come after the dot) is variable. If field name weren't variable I'd
say myQuery.data.FirstName[i] or myQuery.data.FirstName[0] . The
example above is very dynamic whereas the two little snippets just
here were much more static calling specifically to find out what value
is in the 'FirstName' field for the first record.
>
> I hope I don't sound like I'm talking down to you at all. that's not
my intention. Let me know if you need any more help or clarification! :o)
>
> Chris
>
> ----- Original Message -----
> From: "josegura93" < josegura@... >
> To: ajaxcfc@yahoogroups.com
> Sent: Friday, March 7, 2008 2:37:41 PM (GMT-0600) America/Chicago
> Subject: [ajaxcfc] jquery + AjaxCFC: retrieving data rows
>
>
>
>
>
>
>
> First and foremost I want to thank Chris Jordan for his tutorials.
>
> I was able to perform a dump of my query and extract recordcount and
> columnlist. What I don't know is how to extract rows. I'm not clear
> on how to access say row 0 from (r) callback.
>
> This is what I know:
> ...
> success: function(r){
> var rc = r.recordcount;
> var cl = r.columnlist;
> $('#myInfo').append(rc + "<br>" + cl);
>
> }
> ...
> <div id="myInfo"></div>
>
> Eventually I would like to use ingrid or jqGrid but I can't go forward
> without knowing the above.
>
> Thanks.
>


#1548 From: "josegura93" <jsegura01@...>
Date: Sat Mar 8, 2008 1:07 am
Subject: Re: jquery + AjaxCFC: retrieving data rows
josegura93
Offline Offline
Send Email Send Email
 
Worked for me.  Thanks for clearing it up.  I copied the snippet from
your blog early on but forgot to include cfjs.  I was hung up trying
to perform the loop via jquery once my first attempt failed so I tried
to get just one row.  Your explanation on array notation worked too.

Once again, thanks!


--- In ajaxcfc@yahoogroups.com, Chris Jordan <cjordan@...> wrote:
>
> Man... the formatting on that post just *did not* work out. Yikes!
Sorry.
>
> Chris
> ----- Original Message -----
> From: "Chris Jordan" <cjordan@...>
> To: ajaxcfc@yahoogroups.com
> Sent: Friday, March 7, 2008 3:15:00 PM (GMT-0600) America/Chicago
> Subject: Re: [ajaxcfc] jquery + AjaxCFC: retrieving data rows
>
>
>
>
>
>
>
> How can I not respond? Thanks for the kind words on the tutorials. I
wish they were a little better. :o)
>
> To access particular rows in your dataset (which is probably JSON
encoded), you need to use array notation. This concept of accessing
query results using array notation can also be used inside ColdFusion
so it's actually not too different.
>
> So in your example you've got r.recordcount and r.columnlist and
those hold what you expect. The only thing left is r.data. This holds
your actual data and it's like a struct of arrays, so you would access
the data like this:
>
> r.data.columnname[index]
>
> for instance if you wanted to loop over your dataset (let's call it
myQuery instead of r) like you would in CF you'd do something like this:
>
> 1 var table = "" ;
> 2 table += " <table> " ;
> 3 for(i = 0; i < myQuery.recordcount; i++){ // here we're looping
once for every record
> 4 table += " <tr> "
> 5 for(n = 1; n <= $ .ListLen(myQuery.columnlist); n++){ // once for
every field
> 6 fieldname = $.ListGetAt(myQuery.columnlist, n);
> 7 table += " <td> " + myQuery.data[fieldname][i] + " </td> " ;
> &n bsp;8 }
> 9 table += " </tr> " ;
> 10 }
> 11 table += " </table> " ;
>
> If this looks familiar, it's because I stole it from my own
tutorial. In the above example I'm using CFJS to get $.ListLen() and
$.ListGetAt()
>
> Does this help? If not, let me know exactly what's causing you to
scratch your head, and I'll attempt to help out. :o)
>
> If you curious about the syntax on line 7 where it says:
> myQuery.data[fieldname][i]
>
> An object in JavaScript (an a query object in ColdFusion) can be
access in this way when the member key (the bit that would normally
come after the dot) is variable. If field name weren't variable I'd
say myQuery.data.FirstName[i] or myQuery.data.FirstName[0] . The
example above is very dynamic whereas the two little snippets just
here were much more static calling specifically to find out what value
is in the 'FirstName' field for the first record.
>
> I hope I don't sound like I'm talking down to you at all. that's not
my intention. Let me know if you need any more help or clarification! :o)
>
> Chris
>
> ----- Original Message -----
> From: "josegura93" < josegura@... >
> To: ajaxcfc@yahoogroups.com
> Sent: Friday, March 7, 2008 2:37:41 PM (GMT-0600) America/Chicago
> Subject: [ajaxcfc] jquery + AjaxCFC: retrieving data rows
>
>
>
>
>
>
>
> First and foremost I want to thank Chris Jordan for his tutorials.
>
> I was able to perform a dump of my query and extract recordcount and
> columnlist. What I don't know is how to extract rows. I'm not clear
> on how to access say row 0 from (r) callback.
>
> This is what I know:
> ...
> success: function(r){
> var rc = r.recordcount;
> var cl = r.columnlist;
> $('#myInfo').append(rc + "<br>" + cl);
>
> }
> ...
> <div id="myInfo"></div>
>
> Eventually I would like to use ingrid or jqGrid but I can't go forward
> without knowing the above.
>
> Thanks.
>

#1547 From: Chris Jordan <cjordan@...>
Date: Fri Mar 7, 2008 9:18 pm
Subject: Re: jquery + AjaxCFC: retrieving data rows
c_s_jordan
Offline Offline
Send Email Send Email
 
Man... the formatting on that post just *did not* work out. Yikes! Sorry.

Chris
----- Original Message -----
From: "Chris Jordan" <cjordan@...>
To: ajaxcfc@yahoogroups.com
Sent: Friday, March 7, 2008 3:15:00 PM (GMT-0600) America/Chicago
Subject: Re: [ajaxcfc] jquery + AjaxCFC: retrieving data rows

How can I not respond? Thanks for the kind words on the tutorials. I wish they were a little better. :o)

To access particular rows in your dataset (which is probably JSON encoded), you need to use array notation. This concept of accessing query results using array notation can also be used inside ColdFusion so it's actually not too different.

So in your example you've got r.recordcount and r.columnlist and those hold what you expect. The only thing left is r.data. This holds your actual data and it's like a struct of arrays, so you would access the data like this:

r.data.columnname[index]

for instance if you wanted to loop over your dataset (let's call it myQuery instead of r) like you would in CF you'd do something like this:

 1 var table = "";
 2 table += "<table>";
 3 for(i = 0; i < myQuery.recordcount; i++){ // here we're looping once for every record
 4   table += "<tr>"
 5   for(n = 1; n <= $ .ListLen(myQuery.columnlist); n++){ // once for every field
 6      fieldname = $.ListGetAt(myQuery.columnlist, n);
 7      table += "<td>" + myQuery.data[fieldname][i] + "</td>";
&n bsp;8   }
 9   table += "</tr>";
10 }
11 table += "</table>";

If this looks familiar, it's because I stole it from my own tutorial. In the above example I'm using CFJS to get $.ListLen() and $.ListGetAt()

Does this help? If not, let me know exactly what's causing you to scratch your head, and I'll attempt to help out. :o)

If you curious about the syntax on line 7 where it says:
    myQuery.data[fieldname][i]


An object in JavaScript (an a query object in ColdFusion) can be access in this way when the member key (the bit that would normally come after the dot) is variable. If field name weren't variable I'd say myQuery.data.FirstName[i] or myQuery.data.FirstName[0]. The example above is very dynamic whereas the two little snippets just here were much more static calling specifically to find out what value is in the 'FirstName' field for the first record.

I hope I don't sound like I'm talking down to you at all. that's not my intention. Let me know if you need any more help or clarification! :o)

Chris

----- Original Message -----
From: "josegura93" <josegura@...>
To: ajaxcfc@yahoogroups.com
Sent: Friday, March 7, 2008 2:37:41 PM (GMT-0600) America/Chicago
Subject: [ajaxcfc] jquery + AjaxCFC: retrieving data rows

First and foremost I want to thank Chris Jordan for his tutorials.

I was able to perform a dump of my query and extract recordcount and
columnlist. What I don't know is how to extract rows. I'm not clear
on how to access say row 0 from (r) callback.

This is what I know:
...
success: function(r){
var rc = r.recordcount;
var cl = r.columnlist;
$('#myInfo').append(rc + "<br>" + cl);

}
...
<div id="myInfo"></div>

Eventually I would like to use ingrid or jqGrid but I can't go forward
without knowing the above.

Thanks.


#1546 From: Chris Jordan <cjordan@...>
Date: Fri Mar 7, 2008 9:15 pm
Subject: Re: jquery + AjaxCFC: retrieving data rows
c_s_jordan
Offline Offline
Send Email Send Email
 
How can I not respond? Thanks for the kind words on the tutorials. I wish they were a little better. :o)

To access particular rows in your dataset (which is probably JSON encoded), you need to use array notation. This concept of accessing query results using array notation can also be used inside ColdFusion so it's actually not too different.

So in your example you've got r.recordcount and r.columnlist and those hold what you expect. The only thing left is r.data. This holds your actual data and it's like a struct of arrays, so you would access the data like this:

r.data.columnname[index]

for instance if you wanted to loop over your dataset (let's call it myQuery instead of r) like you would in CF you'd do something like this:

 1 var table = "";
 2 table += "<table>";
 3 for(i = 0; i < myQuery.recordcount; i++){ // here we're looping once for every record
 4   table += "<tr>"
 5   for(n = 1; n <= $.ListLen(myQuery.columnlist); n++){ // once for every field
 6      fieldname = $.ListGetAt(myQuery.columnlist, n);
 7      table += "<td>" + myQuery.data[fieldname][i] + "</td>";
 8   }
 9   table += "</tr>";
10 }
11 table += "</table>";

If this looks familiar, it's because I stole it from my own tutorial. In the above example I'm using CFJS to get $.ListLen() and $.ListGetAt()

Does this help? If not, let me know exactly what's causing you to scratch your head, and I'll attempt to help out. :o)

If you curious about the syntax on line 7 where it says:
    myQuery.data[fieldname][i]


An object in JavaScript (an a query object in ColdFusion) can be access in this way when the member key (the bit that would normally come after the dot) is variable. If field name weren't variable I'd say myQuery.data.FirstName[i] or myQuery.data.FirstName[0]. The example above is very dynamic whereas the two little snippets just here were much more static calling specifically to find out what value is in the 'FirstName' field for the first record.

I hope I don't sound like I'm talking down to you at all. that's not my intention. Let me know if you need any more help or clarification! :o)

Chris

----- Original Message -----
From: "josegura93" <josegura@...>
To: ajaxcfc@yahoogroups.com
Sent: Friday, March 7, 2008 2:37:41 PM (GMT-0600) America/Chicago
Subject: [ajaxcfc] jquery + AjaxCFC: retrieving data rows

First and foremost I want to thank Chris Jordan for his tutorials.

I was able to perform a dump of my query and extract recordcount and
columnlist. What I don't know is how to extract rows. I'm not clear
on how to access say row 0 from (r) callback.

This is what I know:
...
success: function(r){
var rc = r.recordcount;
var cl = r.columnlist;
$('#myInfo').append(rc + "<br>" + cl);

}
...
<div id="myInfo"></div>

Eventually I would like to use ingrid or jqGrid but I can't go forward
without knowing the above.

Thanks.


#1545 From: "josegura93" <josegura@...>
Date: Fri Mar 7, 2008 8:37 pm
Subject: jquery + AjaxCFC: retrieving data rows
josegura93
Offline Offline
Send Email Send Email
 
First and foremost I want to thank Chris Jordan for his tutorials.

I was able to perform a dump of my query and extract recordcount and
columnlist.  What I don't know is how to extract rows.  I'm not clear
on how to access say row 0 from (r) callback.

This is what I know:
...
success: function(r){
		 var rc = r.recordcount;
		 var cl = r.columnlist;
		 $('#myInfo').append(rc + "<br>" + cl);

	 }
...
<div id="myInfo"></div>

Eventually I would like to use ingrid or jqGrid but I can't go forward
without knowing the above.

Thanks.

#1544 From: "Daniel" <twistedrealityha@...>
Date: Wed Mar 5, 2008 3:23 pm
Subject: Re: Access two different CFC's
bd221182
Offline Offline
Send Email Send Email
 
--- In ajaxcfc@yahoogroups.com, "Keith" <head_java@...> wrote:
>
> Solution by geneaiello123@...,
>
>
> Yes you can. _ajaxConfig is a comma delimited list.
>
> eg. _ajaxConfig =
> {'UserAjaxCFC':'/cfcs/userAjax.cfc','departmentCFC':'/cfcs/department
> .cfc','accountAjaxCFC':'/cfcs/accountAjax.cfc','_jsscriptFolder':'/js
> '};
>
> Tested and works. Thanks.
>
>

Cheers!

#1543 From: "Keith" <head_java@...>
Date: Wed Mar 5, 2008 3:19 pm
Subject: Re: Access two different CFC's
head_java
Offline Offline
Send Email Send Email
 
Solution by geneaiello123@...,


Yes you can. _ajaxConfig is a comma delimited list.

eg. _ajaxConfig =
{'UserAjaxCFC':'/cfcs/userAjax.cfc','departmentCFC':'/cfcs/department
.cfc','accountAjaxCFC':'/cfcs/accountAjax.cfc','_jsscriptFolder':'/js
'};

Tested and works. Thanks.


--- In ajaxcfc@yahoogroups.com, "Keith" <head_java@...> wrote:
>
> Not sure if anyone stills uses or monitors this group, but I'm
asking
> anyway. Have written many... ajaxcfc programs always using the
same
> CFC file defined in the ajaxcfc parameter _ajaxConfig. Now this
CFC is
> getting very large. Question: Can I access two different CFC's in
the
> same program (some how changing the parameter _ajaxConfig, which
does
> not work) ? I could call the CFC and then just INVOKE a different
> function, but trying to avoid this solution. Thanks
>

#1542 From: "Daniel" <twistedrealityha@...>
Date: Wed Mar 5, 2008 2:41 pm
Subject: Re: Access two different CFC's
bd221182
Offline Offline
Send Email Send Email
 
--- In ajaxcfc@yahoogroups.com, "Keith" <head_java@...> wrote:
>
> Not sure if anyone stills uses or monitors this group, but I'm asking
> anyway. Have written many... ajaxcfc programs always using the same
> CFC file defined in the ajaxcfc parameter _ajaxConfig. Now this CFC
is
> getting very large. Question: Can I access two different CFC's in the
> same program (some how changing the parameter _ajaxConfig, which does
> not work) ? I could call the CFC and then just INVOKE a different
> function, but trying to avoid this solution. Thanks
>

I'm also interested in an answer to this question.

I have programmed a web application which uses a 2000 line page with a
4000 line page CFC. It'd be nice to split this up, for hopefully
performance benefits and organisation.

Regards, Dan

#1541 From: "Keith" <head_java@...>
Date: Wed Mar 5, 2008 2:30 pm
Subject: Access two different CFC's
head_java
Offline Offline
Send Email Send Email
 
Not sure if anyone stills uses or monitors this group, but I'm asking
anyway. Have written many... ajaxcfc programs always using the same
CFC file defined in the ajaxcfc parameter _ajaxConfig. Now this CFC is
getting very large. Question: Can I access two different CFC's in the
same program (some how changing the parameter _ajaxConfig, which does
not work) ? I could call the CFC and then just INVOKE a different
function, but trying to avoid this solution. Thanks

#1540 From: "programmerneo" <programmer_neo@...>
Date: Tue Jan 22, 2008 4:19 pm
Subject: Re: Parameters limit?
programmerneo
Offline Offline
Send Email Send Email
 
I would recommend, updating to the latest AjaxCFC, if you can. (i.e.
you are not already using an older version of AjaxCFC in other
places.)

If you can not upgrade, then the Previous version, used to require
you to defined a cfargument, for the structure you were passing. So
in your case, You only arguemnt should be...
<cfargument name="stcMyForm" type="struct" required="yes">

... then you would reference like ...

arguments.stcMyForm.txtFirstname

try that.


--- In ajaxcfc@yahoogroups.com, "programmerneo" <programmer_neo@...>
wrote:
>
> Its pretty easy, and it took me a few tries to figure this out.
> (Since the AjaxCFC functionality has changed several times, in each
> incarnation of it. And the documentation has yet to be updated to
> reflect the changes.)
>
> In your CFC function, you do NOT need any cfarguments, to capture
the
> FORM, for some reason, all the FORM elements, are automatically put
> into the ARGUMENTS scope... so just reference each element by their
> name on the form. So if you have a textbox called txtFirstname...
you
> would refernce it in your cfc like ...  arguments.txtFirstname
>
> I rarely pass less than 2-3 parameters into a function, so I always
> pass them in, in a Structure (By first creating a structure in
> javascript). Or else, I am always passing in the FORM (By first,
> serializing it. BTW, You MUST always serialize a FORM first).
>
> Hope this helps.
>
>
>
> --- In ajaxcfc@yahoogroups.com, Farah Omar <ofarah24@> wrote:
> >
> > Thank you for your response. How can I access the form variables
> once I am inside 'myFunction'?
> >
> > programmerneo <programmer_neo@> wrote:          To pass your
> FORM, you'll just need to serialize it...
> >
> > DWREngine._execute
> (_ajaxConfig.myAjaxCFC,null,'myFunction',DWRUtil.serializeForm
> (docForm),responseMyFunction);
> >
> > ... where docForm, is your document.Form[0].
> >
> > --- In ajaxcfc@yahoogroups.com, "ofarah24" <ofarah24@> wrote:
> > >
> > > I remember reading that may be there is a limit on how many
> parameters
> > > you can pass to a function. I tried looking into the older
> messages to
> > > find it but I had no luck. Here is my code:
> > >
> > > function searchRecords(form,clientName, staffName, topic,
> specificDate,
> > > fromDate, toDate, serviceType,transactionID, department,
> affiliation)
> > > {
> > > DWREngine._execute(_ajaxConfig._cfscriptLocation,
> > > null, 'getRecords',form, clientName, staffName, topic,
> specificDate,
> > > fromDate, toDate, serviceType, transactionID, affiliation,
> > > getRecordsResult);
> > > }
> > >
> > > If I add a 11th value to the DWREngine._execute(), it doesn't
> seem to
> > > getting passed on. I can't read its value.
> > >
> > > Dose this mean that I can only pass 10 parameters?
> > >
> >
> >
> >
> >
> >
> >
> > ---------------------------------
> > Be a better friend, newshound, and know-it-all with Yahoo!
Mobile.
> Try it now.
> >
>

#1539 From: "programmerneo" <programmer_neo@...>
Date: Tue Jan 22, 2008 2:45 pm
Subject: Re: Parameters limit?
programmerneo
Offline Offline
Send Email Send Email
 
Its pretty easy, and it took me a few tries to figure this out.
(Since the AjaxCFC functionality has changed several times, in each
incarnation of it. And the documentation has yet to be updated to
reflect the changes.)

In your CFC function, you do NOT need any cfarguments, to capture the
FORM, for some reason, all the FORM elements, are automatically put
into the ARGUMENTS scope... so just reference each element by their
name on the form. So if you have a textbox called txtFirstname... you
would refernce it in your cfc like ...  arguments.txtFirstname

I rarely pass less than 2-3 parameters into a function, so I always
pass them in, in a Structure (By first creating a structure in
javascript). Or else, I am always passing in the FORM (By first,
serializing it. BTW, You MUST always serialize a FORM first).

Hope this helps.



--- In ajaxcfc@yahoogroups.com, Farah Omar <ofarah24@...> wrote:
>
> Thank you for your response. How can I access the form variables
once I am inside 'myFunction'?
>
> programmerneo <programmer_neo@...> wrote:          To pass your
FORM, you'll just need to serialize it...
>
> DWREngine._execute
(_ajaxConfig.myAjaxCFC,null,'myFunction',DWRUtil.serializeForm
(docForm),responseMyFunction);
>
> ... where docForm, is your document.Form[0].
>
> --- In ajaxcfc@yahoogroups.com, "ofarah24" <ofarah24@> wrote:
> >
> > I remember reading that may be there is a limit on how many
parameters
> > you can pass to a function. I tried looking into the older
messages to
> > find it but I had no luck. Here is my code:
> >
> > function searchRecords(form,clientName, staffName, topic,
specificDate,
> > fromDate, toDate, serviceType,transactionID, department,
affiliation)
> > {
> > DWREngine._execute(_ajaxConfig._cfscriptLocation,
> > null, 'getRecords',form, clientName, staffName, topic,
specificDate,
> > fromDate, toDate, serviceType, transactionID, affiliation,
> > getRecordsResult);
> > }
> >
> > If I add a 11th value to the DWREngine._execute(), it doesn't
seem to
> > getting passed on. I can't read its value.
> >
> > Dose this mean that I can only pass 10 parameters?
> >
>
>
>
>
>
>
> ---------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.
Try it now.
>

#1538 From: Farah Omar <ofarah24@...>
Date: Tue Jan 22, 2008 2:35 pm
Subject: Re: Re: Parameters limit?
ofarah24
Offline Offline
Send Email Send Email
 
Thank you for your response. How can I access the form variables once I am inside 'myFunction'?

programmerneo <programmer_neo@...> wrote:
To pass your FORM, you'll just need to serialize it...

DWREngine._execute(_ajaxConfig.myAjaxCFC,null,'myFunction',DWRUtil.serializeForm(docForm),responseMyFunction);

... where docForm, is your document.Form[0].

--- In ajaxcfc@yahoogroups.com, "ofarah24" <ofarah24@...> wrote:
>
> I remember reading that may be there is a limit on how many parameters
> you can pass to a function. I tried looking into the older messages to
> find it but I had no luck. Here is my code:
>
> function searchRecords(form,clientName, staffName, topic, specificDate,
> fromDate, toDate, serviceType,transactionID, department, affiliation)
> {
> DWREngine._execute(_ajaxConfig._cfscriptLocation,
> null, 'getRecords',form, clientName, staffName, topic, specificDate,
> fromDate, toDate, serviceType, transactionID, affiliation,
> getRecordsResult);
> }
>
> If I add a 11th value to the DWREngine._execute(), it doesn't seem to
> getting passed on. I can't read its value.
>
> Dose this mean that I can only pass 10 parameters?
>



Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

#1537 From: "programmerneo" <programmer_neo@...>
Date: Mon Jan 21, 2008 10:22 pm
Subject: Re: Parameters limit?
programmerneo
Offline Offline
Send Email Send Email
 
To pass your FORM, you'll just need to serialize it...

DWREngine._execute(_ajaxConfig.myAjaxCFC,null,'myFunction',DWRUtil.serializeForm\
(docForm),responseMyFunction);

... where docForm, is your document.Form[0].


--- In ajaxcfc@yahoogroups.com, "ofarah24" <ofarah24@...> wrote:
>
> I remember reading that may be there is a limit on how many parameters
> you can pass to a function. I tried looking into the older messages to
> find it but I had no luck. Here is my code:
>
> function searchRecords(form,clientName, staffName, topic, specificDate,
> fromDate, toDate, serviceType,transactionID, department, affiliation)
> {
>  DWREngine._execute(_ajaxConfig._cfscriptLocation,
> null, 'getRecords',form, clientName, staffName, topic, specificDate,
> fromDate, toDate, serviceType, transactionID, affiliation,
> getRecordsResult);
> }
>
> If I add a 11th value to the DWREngine._execute(), it doesn't seem to
> getting passed on. I can't read its value.
>
> Dose this mean that I can only pass 10 parameters?
>

#1536 From: "ofarah24" <ofarah24@...>
Date: Mon Jan 21, 2008 6:56 pm
Subject: Re: Parameters limit?
ofarah24
Offline Offline
Send Email Send Email
 
Thanks for the reply. Yes, some examples will help.

Thank you/

--- In ajaxcfc@yahoogroups.com, "Keith" <head_java@...> wrote:
>
> Good Afternoon,
>
> That is correct, I had the same issue, only 10 parameters. Solution
> is to pass a WDDX recordset, and you will not have any limits. If
> you need me to explain WDDX and need examples let me know. lol
>
> --- In ajaxcfc@yahoogroups.com, "ofarah24" <ofarah24@> wrote:
> >
> > I remember reading that may be there is a limit on how many
> parameters
> > you can pass to a function. I tried looking into the older
> messages to
> > find it but I had no luck. Here is my code:
> >
> > function searchRecords(form,clientName, staffName, topic,
> specificDate,
> > fromDate, toDate, serviceType,transactionID, department,
> affiliation)
> > {
> >  DWREngine._execute(_ajaxConfig._cfscriptLocation,
> > null, 'getRecords',form, clientName, staffName, topic,
> specificDate,
> > fromDate, toDate, serviceType, transactionID, affiliation,
> > getRecordsResult);
> > }
> >
> > If I add a 11th value to the DWREngine._execute(), it doesn't
seem
> to
> > getting passed on. I can't read its value.
> >
> > Dose this mean that I can only pass 10 parameters?
> >
>

#1535 From: "programmerneo" <programmer_neo@...>
Date: Mon Jan 21, 2008 6:46 pm
Subject: Re: Parameters limit?
programmerneo
Offline Offline
Send Email Send Email
 
Just pass all you parameters in a structure. For example just pass the
whole FORM, to your cfc.


--- In ajaxcfc@yahoogroups.com, "ofarah24" <ofarah24@...> wrote:
>
> I remember reading that may be there is a limit on how many parameters
> you can pass to a function. I tried looking into the older messages to
> find it but I had no luck. Here is my code:
>
> function searchRecords(form,clientName, staffName, topic, specificDate,
> fromDate, toDate, serviceType,transactionID, department, affiliation)
> {
>  DWREngine._execute(_ajaxConfig._cfscriptLocation,
> null, 'getRecords',form, clientName, staffName, topic, specificDate,
> fromDate, toDate, serviceType, transactionID, affiliation,
> getRecordsResult);
> }
>
> If I add a 11th value to the DWREngine._execute(), it doesn't seem to
> getting passed on. I can't read its value.
>
> Dose this mean that I can only pass 10 parameters?
>

#1534 From: "Keith" <head_java@...>
Date: Mon Jan 21, 2008 6:32 pm
Subject: Re: Parameters limit?
head_java
Offline Offline
Send Email Send Email
 
Good Afternoon,

That is correct, I had the same issue, only 10 parameters. Solution
is to pass a WDDX recordset, and you will not have any limits. If
you need me to explain WDDX and need examples let me know. lol

--- In ajaxcfc@yahoogroups.com, "ofarah24" <ofarah24@...> wrote:
>
> I remember reading that may be there is a limit on how many
parameters
> you can pass to a function. I tried looking into the older
messages to
> find it but I had no luck. Here is my code:
>
> function searchRecords(form,clientName, staffName, topic,
specificDate,
> fromDate, toDate, serviceType,transactionID, department,
affiliation)
> {
>  DWREngine._execute(_ajaxConfig._cfscriptLocation,
> null, 'getRecords',form, clientName, staffName, topic,
specificDate,
> fromDate, toDate, serviceType, transactionID, affiliation,
> getRecordsResult);
> }
>
> If I add a 11th value to the DWREngine._execute(), it doesn't seem
to
> getting passed on. I can't read its value.
>
> Dose this mean that I can only pass 10 parameters?
>

#1533 From: "ofarah24" <ofarah24@...>
Date: Mon Jan 21, 2008 5:09 pm
Subject: Parameters limit?
ofarah24
Offline Offline
Send Email Send Email
 
I remember reading that may be there is a limit on how many parameters
you can pass to a function. I tried looking into the older messages to
find it but I had no luck. Here is my code:

function searchRecords(form,clientName, staffName, topic, specificDate,
fromDate, toDate, serviceType,transactionID, department, affiliation)
{
	 DWREngine._execute(_ajaxConfig._cfscriptLocation,
null, 'getRecords',form, clientName, staffName, topic, specificDate,
fromDate, toDate, serviceType, transactionID, affiliation,
getRecordsResult);
}

If I add a 11th value to the DWREngine._execute(), it doesn't seem to
getting passed on. I can't read its value.

Dose this mean that I can only pass 10 parameters?

#1531 From: "Aaron Rouse" <aaron.rouse@...>
Date: Wed Dec 12, 2007 3:28 pm
Subject: Re: RE: inGrid
aaron_rouse
Offline Offline
Send Email Send Email
 
This particular application I am working on is using CF7 and do not foresee it going to CF8 for a long time, if ever since the IT Architects are pushing hard for ASP.NET for anything they can push on.  I will have to test it out and see how it works out on CF7.  I just liked how it worked, there might be a different data gird out there that I might prefer for my needs.

On Dec 12, 2007 7:25 AM, Rob Kolosky <RKolosky@...> wrote:

Aaron Rouse said --

>One thing that I took note off from your blog postings was the minor
>mentioning of ingrid, that is something I have bookmarked for possible
>future use for when users need to search on records in other tables to
>create an entry in bridging tables. The current solution for that does
page
>reloads(click to add, go to search page, do search, select records,
submit,
>back on the page you started on with HTML grid filled with related
records
>that were selected), works well enough but is several years old and
just be
>nice to retire it with something more user friendly.

While I'm not using inGrid with AjaxCFC, I am using it with Cold Fusion
8 and jQuery.

I got it working, but I had to rewrite some of the core inGrid JS files
for it to cooperate with CF 8's way of returning JSON values. So, I
haven't used it multiple places in my application yet, but I'm expecting
that to be difficult.

--
Rob




--
Aaron Rouse
http://www.happyhacker.com/

#1530 From: "Rob Kolosky" <RKolosky@...>
Date: Wed Dec 12, 2007 1:25 pm
Subject: RE: inGrid
dasniper66
Offline Offline
Send Email Send Email
 
Aaron Rouse said --

>One thing that I took note off from your blog postings was the minor
>mentioning of ingrid, that is something I have bookmarked for possible
>future use for when users need to search on records in other tables to
>create an entry in bridging tables.  The current solution for that does
page
>reloads(click to add, go to search page, do search, select records,
submit,
>back on the page you started on with  HTML grid filled with related
records
>that were selected), works well enough but is several years old and
just be
>nice to retire it with something more user friendly.

While I'm not using inGrid with AjaxCFC, I am using it with Cold Fusion
8 and jQuery.

I got it working, but I had to rewrite some of the core inGrid JS files
for it to cooperate with CF 8's way of returning JSON values. So, I
haven't used it multiple places in my application yet, but I'm expecting
that to be difficult.

--
Rob

#1529 From: "Aaron Rouse" <aaron.rouse@...>
Date: Wed Dec 12, 2007 11:57 am
Subject: Re: Re: AjaxCFC + jQuery
aaron_rouse
Offline Offline
Send Email Send Email
 
Thanks, I will look into the loading message later today when I make it in.

In regards to finding the DWR harder to read, the only DWR line I have is this and guess it would be trivial to change but if it would be just for readability reasons then probably will not happen until I have time to go back and rewrite the other pages:

DWREngine._execute("Components/AjaxTables.cfc", null, "GetJQueryPropertyTable", {"UID":"#Ses.UID#", "UserAccess":"#Ses.UserAccess#", "ProdSegID":ProdSegID, "CityID":CityID, "StateID":StateID, "CountryID":CountryID, "AddressVal":AddressVal}, buildPropTableResults);

The GetJQueryPropertyTable builds JS that is using jQuery for populating my table body.

Then the other function is:

function buildPropTableResults (ResultSet) { eval(ResultSet); }

On Dec 12, 2007 12:21 AM, Chris Jordan <cjordan@...> wrote:

Hi Aaron,

Responses inline :o)



----- Original Message -----
From: "Aaron Rouse" <aaron.rouse@... >
To: ajaxcfc@yahoogroups.com
Sent: Tuesday, December 11, 2007 9:25:28 PM (GMT-0600) America/Chicago
Subject: Re: [ajaxcfc] Re: AjaxCFC + jQuery

I am not married to one way or the other, just was looking for a solution for something at work.  Since the server side piece of the example worked that is what I ended up using.  I actually read over your tutorials the other day when I ran into the show stopper with the example file with AjaxCFC.  I considered at the time trying a route similar to what you laid out but decided that if the server solution worked in the example file that I would just migrate my solution into that since it would take the least amount of time for something that functioned. I'd say it is a hybrid solution, uses the DWR for the call to the server and uses jQuery for the population of the table.

Okay, I buy that I guess. It's whatever works for you. But I'd really suggest slowly refactoring your code to use the jQuerified version of the AjaxCFC calls to the server. In my experience I found them far easier to understand and write than the DWR ones. But whatever is workin' for you can't be all bad right? ;o)

I actually do have two other sections that are rather old and use DWR but when those forms are submitted in FireFox any fields added by the AJAX are not found on the page posted to.  I ran into the same problem today with the "hybrid" solution on this new page and after spending way too long going through it I finally found it was because the HTML generated by the RAD tool was not closing all tags properly and that caused the issue so wondering if that is the same problem on the old pages. Regardless I put down in my task list to just redo the solutions on the others when time is available.

Wise decision. :o)

One thing I am curious is if there is another solution for the DWRUtil.useLoadingMessage(); ?  My problem with it is that on some pages it shows up higher up in the browser out of sight.  I might be just doing something wrong, would be nice to define where it will show up on the page and maybe there is a way, I honestly have not even looked into it.

What I typically do is put a div with an id like "LoadingMessage" on the page where I want it to show up. Then just before I start a call to the server I say something like:

$("#LoadingMessage").empty().append("loading...");

or maybe:

var loadingImage = "<img src='path/to/my/image.gif'>";
$("#LoadingMessage").empty().append(loadingImage);

And then when the call returns I just remove the message:

$("#LoadingMessage").empty();

or maybe:

$("#LoadingMessage").empty().append("&nbsp;");

One thing that I took note off from your blog postings was the minor mentioning of ingrid, that is something I have bookmarked for possible future use for when users need to search on records in other tables to create an entry in bridging tables. 

Ingrid isn't the only solution out there for nice grid stuff, it's just one that I pulled off of the jQuery mailing list. I have not infact actually used it, but I took a look at its demo before mentioning it on my blog.

Take care Aaron!
Cheers,
Chris

P.S. This didn't seem to quote your original message the way I'm used to, so I hope this is readable. :o)

On Dec 11, 2007 3:03 PM, Chris Jordan <cjordan@...> wrote:

Unless you have some old code that still uses DWR, I'd say forget about using the compatibility stuff, you only need to include it if you plan to use any calls to the DWR library. If you're using AjaxCFC with jQuery then it's probably worth refactoring any pieces that use DWR to utilize jQuery instead.

I realize that's probably not the answer you were looking for. Sorry, but I would just ditch that DWR stuff completely. Take DWR out of the mix and I'm sure that folks will be able to help you. Check out the tutorial I wrote regarding integrating AjaxCFC and jQuery ( http://cjordan.us/index.cfm/AjaxCFC).

Hope this helps.

Chris



----- Original Message -----
From: "brynoid" < bryan.rountree@...>
To: ajaxcfc@yahoogroups.com
Sent: Tuesday, December 11, 2007 12:58:41 PM (GMT-0600) America/Chicago
Subject: [ajaxcfc] Re: AjaxCFC + jQuery

Did you ever figure this out? I run into the same problem.

Bryan
--- In ajaxcfc@yahoogroups.com, "Aaron Rouse" <aaron.rouse@...> wrote:
>
> I was trying to run the examples that come with the latest Alpha of
AjaxCFC
> with jQuery and get an error with the first DWRCompatibility.query
example(
> Index.cfm of that directory). The error pops up with a JS
confirmation box
> about a critical error happening when try the "Client Side" box and
when I
> click ok to view the error it states:
>
>
__json__:{"recordcount":1,"columnlist":"fname,id,lname,location,phone","data":{"fname":["Rob"],"id":[1],"lname":["Gonda"],"location":["Florida"],"phone":[" 954-555-5555"]}}
>
> Guess first thing I ought to ask is should the example work or have the
> examples not been finished?
>
> The "Server Side" example works.
>
> Ultimately I am hoping to use it to display unique property records
with a
> radio button selection. I have done this with the old version of
AjaxCFC
> but when that solution would get the form submitted the form
elements would
> not show up on the action page if using FireFox so was hoping maybe
to have
> better luck with jQuery in the mix.
>
> --
> Aaron Rouse
> http://www.happyhacker.com/
>




--
Aaron Rouse
http://www.happyhacker.com/




--
Aaron Rouse
http://www.happyhacker.com/

#1528 From: Chris Jordan <cjordan@...>
Date: Wed Dec 12, 2007 6:21 am
Subject: Re: Re: AjaxCFC + jQuery
c_s_jordan
Offline Offline
Send Email Send Email
 
Hi Aaron,

Responses inline :o)

----- Original Message -----
From: "Aaron Rouse" <aaron.rouse@...>
To: ajaxcfc@yahoogroups.com
Sent: Tuesday, December 11, 2007 9:25:28 PM (GMT-0600) America/Chicago
Subject: Re: [ajaxcfc] Re: AjaxCFC + jQuery

I am not married to one way or the other, just was looking for a solution for something at work.  Since the server side piece of the example worked that is what I ended up using.  I actually read over your tutorials the other day when I ran into the show stopper with the example file with AjaxCFC.  I considered at the time trying a route similar to what you laid out but decided that if the server solution worked in the example file that I would just migrate my solution into that since it would take the least amount of time for something that functioned. I'd say it is a hybrid solution, uses the DWR for the call to the server and uses jQuery for the population of the table.

Okay, I buy that I guess. It's whatever works for you. But I'd really suggest slowly refactoring your code to use the jQuerified version of the AjaxCFC calls to the server. In my experience I found them far easier to understand and write than the DWR ones. But whatever is workin' for you can't be all bad right? ;o)

I actually do have two other sections that are rather old and use DWR but when those forms are submitted in FireFox any fields added by the AJAX are not found on the page posted to.  I ran into the same problem today with the "hybrid" solution on this new page and after spending way too long going through it I finally found it was because the HTML generated by the RAD tool was not closing all tags properly and that caused the issue so wondering if that is the same problem on the old pages. Regardless I put down in my task list to just redo the solutions on the others when time is available.

Wise decision. :o)

One thing I am curious is if there is another solution for the DWRUtil.useLoadingMessage(); ?  My problem with it is that on some pages it shows up higher up in the browser out of sight.  I might be just doing something wrong, would be nice to define where it will show up on the page and maybe there is a way, I honestly have not even looked into it.

What I typically do is put a div with an id like "LoadingMessage" on the page where I want it to show up. Then just before I start a call to the server I say something like:

$("#LoadingMessage").empty().append("loading...");

or maybe:

var loadingImage = "<img src='path/to/my/image.gif'>";
$("#LoadingMessage").empty().append(loadingImage);

And then when the call returns I just remove the message:

$("#LoadingMessage").empty();

or maybe:

$("#LoadingMessage").empty().append("&nbsp;");

One thing that I took note off from your blog postings was the minor mentioning of ingrid, that is something I have bookmarked for possible future use for when users need to search on records in other tables to create an entry in bridging tables. 

Ingrid isn't the only solution out there for nice grid stuff, it's just one that I pulled off of the jQuery mailing list. I have not infact actually used it, but I took a look at its demo before mentioning it on my blog.

Take care Aaron!
Cheers,
Chris

P.S. This didn't seem to quote your original message the way I'm used to, so I hope this is readable. :o)

On Dec 11, 2007 3:03 PM, Chris Jordan <cjordan@...> wrote:

Unless you have some old code that still uses DWR, I'd say forget about using the compatibility stuff, you only need to include it if you plan to use any calls to the DWR library. If you're using AjaxCFC with jQuery then it's probably worth refactoring any pieces that use DWR to utilize jQuery instead.

I realize that's probably not the answer you were looking for. Sorry, but I would just ditch that DWR stuff completely. Take DWR out of the mix and I'm sure that folks will be able to help you. Check out the tutorial I wrote regarding integrating AjaxCFC and jQuery ( http://cjordan.us/index.cfm/AjaxCFC).

Hope this helps.

Chris



----- Original Message -----
From: "brynoid" < bryan.rountree@...>
To: ajaxcfc@yahoogroups.com
Sent: Tuesday, December 11, 2007 12:58:41 PM (GMT-0600) America/Chicago
Subject: [ajaxcfc] Re: AjaxCFC + jQuery

Did you ever figure this out? I run into the same problem.

Bryan
--- In ajaxcfc@yahoogroups.com, "Aaron Rouse" <aaron.rouse@...> wrote:
>
> I was trying to run the examples that come with the latest Alpha of
AjaxCFC
> with jQuery and get an error with the first DWRCompatibility.query
example(
> Index.cfm of that directory). The error pops up with a JS
confirmation box
> about a critical error happening when try the "Client Side" box and
when I
> click ok to view the error it states:
>
>
__json__:{"recordcount":1,"columnlist":"fname,id,lname,location,phone","data":{"fname":["Rob"],"id":[1],"lname":["Gonda"],"location":["Florida"],"phone":[" 954-555-5555"]}}
>
> Guess first thing I ought to ask is should the example work or have the
> examples not been finished?
>
> The "Server Side" example works.
>
> Ultimately I am hoping to use it to display unique property records
with a
> radio button selection. I have done this with the old version of
AjaxCFC
> but when that solution would get the form submitted the form
elements would
> not show up on the action page if using FireFox so was hoping maybe
to have
> better luck with jQuery in the mix.
>
> --
> Aaron Rouse
> http://www.happyhacker.com/
>




--
Aaron Rouse
http://www.happyhacker.com/


#1527 From: "Aaron Rouse" <aaron.rouse@...>
Date: Wed Dec 12, 2007 3:25 am
Subject: Re: Re: AjaxCFC + jQuery
aaron_rouse
Offline Offline
Send Email Send Email
 
I am not married to one way or the other, just was looking for a solution for something at work.  Since the server side piece of the example worked that is what I ended up using.  I actually read over your tutorials the other day when I ran into the show stopper with the example file with AjaxCFC.  I considered at the time trying a route similar to what you laid out but decided that if the server solution worked in the example file that I would just migrate my solution into that since it would take the least amount of time for something that functioned. I'd say it is a hybrid solution, uses the DWR for the call to the server and uses jQuery for the population of the table.

I actually do have two other sections that are rather old and use DWR but when those forms are submitted in FireFox any fields added by the AJAX are not found on the page posted to.  I ran into the same problem today with the "hybrid" solution on this new page and after spending way too long going through it I finally found it was because the HTML generated by the RAD tool was not closing all tags properly and that caused the issue so wondering if that is the same problem on the old pages. Regardless I put down in my task list to just redo the solutions on the others when time is available.

One thing I am curious is if there is another solution for the DWRUtil.useLoadingMessage(); ?  My problem with it is that on some pages it shows up higher up in the browser out of sight.  I might be just doing something wrong, would be nice to define where it will show up on the page and maybe there is a way, I honestly have not even looked into it.

One thing that I took note off from your blog postings was the minor mentioning of ingrid, that is something I have bookmarked for possible future use for when users need to search on records in other tables to create an entry in bridging tables.  The current solution for that does page reloads(click to add, go to search page, do search, select records, submit, back on the page you started on with  HTML grid filled with related records that were selected), works well enough but is several years old and just be nice to retire it with something more user friendly.

On Dec 11, 2007 3:03 PM, Chris Jordan <cjordan@...> wrote:

Unless you have some old code that still uses DWR, I'd say forget about using the compatibility stuff, you only need to include it if you plan to use any calls to the DWR library. If you're using AjaxCFC with jQuery then it's probably worth refactoring any pieces that use DWR to utilize jQuery instead.

I realize that's probably not the answer you were looking for. Sorry, but I would just ditch that DWR stuff completely. Take DWR out of the mix and I'm sure that folks will be able to help you. Check out the tutorial I wrote regarding integrating AjaxCFC and jQuery ( http://cjordan.us/index.cfm/AjaxCFC).

Hope this helps.

Chris



----- Original Message -----
From: "brynoid" < bryan.rountree@...>
To: ajaxcfc@yahoogroups.com
Sent: Tuesday, December 11, 2007 12:58:41 PM (GMT-0600) America/Chicago
Subject: [ajaxcfc] Re: AjaxCFC + jQuery

Did you ever figure this out? I run into the same problem.

Bryan
--- In ajaxcfc@yahoogroups.com, "Aaron Rouse" <aaron.rouse@...> wrote:
>
> I was trying to run the examples that come with the latest Alpha of
AjaxCFC
> with jQuery and get an error with the first DWRCompatibility.query
example(
> Index.cfm of that directory). The error pops up with a JS
confirmation box
> about a critical error happening when try the "Client Side" box and
when I
> click ok to view the error it states:
>
>
__json__:{"recordcount":1,"columnlist":"fname,id,lname,location,phone","data":{"fname":["Rob"],"id":[1],"lname":["Gonda"],"location":["Florida"],"phone":[" 954-555-5555"]}}
>
> Guess first thing I ought to ask is should the example work or have the
> examples not been finished?
>
> The "Server Side" example works.
>
> Ultimately I am hoping to use it to display unique property records
with a
> radio button selection. I have done this with the old version of
AjaxCFC
> but when that solution would get the form submitted the form
elements would
> not show up on the action page if using FireFox so was hoping maybe
to have
> better luck with jQuery in the mix.
>
> --
> Aaron Rouse
> http://www.happyhacker.com/
>




--
Aaron Rouse
http://www.happyhacker.com/

#1526 From: Chris Jordan <cjordan@...>
Date: Tue Dec 11, 2007 9:03 pm
Subject: Re: Re: AjaxCFC + jQuery
c_s_jordan
Offline Offline
Send Email Send Email
 
Unless you have some old code that still uses DWR, I'd say forget about using the compatibility stuff, you only need to include it if you plan to use any calls to the DWR library. If you're using AjaxCFC with jQuery then it's probably worth refactoring any pieces that use DWR to utilize jQuery instead.

I realize that's probably not the answer you were looking for. Sorry, but I would just ditch that DWR stuff completely. Take DWR out of the mix and I'm sure that folks will be able to help you. Check out the tutorial I wrote regarding integrating AjaxCFC and jQuery (http://cjordan.us/index.cfm/AjaxCFC).

Hope this helps.

Chris

----- Original Message -----
From: "brynoid" <bryan.rountree@...>
To: ajaxcfc@yahoogroups.com
Sent: Tuesday, December 11, 2007 12:58:41 PM (GMT-0600) America/Chicago
Subject: [ajaxcfc] Re: AjaxCFC + jQuery

Did you ever figure this out? I run into the same problem.

Bryan
--- In ajaxcfc@yahoogroups.com, "Aaron Rouse" <aaron.rouse@...> wrote:
>
> I was trying to run the examples that come with the latest Alpha of
AjaxCFC
> with jQuery and get an error with the first DWRCompatibility.query
example(
> Index.cfm of that directory). The error pops up with a JS
confirmation box
> about a critical error happening when try the "Client Side" box and
when I
> click ok to view the error it states:
>
>
__json__:{"recordcount":1,"columnlist":"fname,id,lname,location,phone","data":{"fname":["Rob"],"id":[1],"lname":["Gonda"],"location":["Florida"],"phone":["954-555-5555"]}}
>
> Guess first thing I ought to ask is should the example work or have the
> examples not been finished?
>
> The "Server Side" example works.
>
> Ultimately I am hoping to use it to display unique property records
with a
> radio button selection. I have done this with the old version of
AjaxCFC
> but when that solution would get the form submitted the form
elements would
> not show up on the action page if using FireFox so was hoping maybe
to have
> better luck with jQuery in the mix.
>
> --
> Aaron Rouse
> http://www.happyhacker.com/
>


#1525 From: "brynoid" <bryan.rountree@...>
Date: Tue Dec 11, 2007 6:58 pm
Subject: Re: AjaxCFC + jQuery
brynoid
Offline Offline
Send Email Send Email
 
Did you ever figure this out?  I run into the same problem.

Bryan
--- In ajaxcfc@yahoogroups.com, "Aaron Rouse" <aaron.rouse@...> wrote:
>
> I was trying to run the examples that come with the latest Alpha of
AjaxCFC
> with jQuery and get an error with the first DWRCompatibility.query
example(
> Index.cfm of that directory).  The error pops up with a JS
confirmation box
> about a critical error happening when try the "Client Side" box and
when I
> click ok to view the error it states:
>
>
__json__:{"recordcount":1,"columnlist":"fname,id,lname,location,phone","data":{"\
fname":["Rob"],"id":[1],"lname":["Gonda"],"location":["Florida"],"phone":["954-5\
55-5555"]}}
>
> Guess first thing I ought to ask is should the example work or have the
> examples not been finished?
>
> The "Server Side" example works.
>
> Ultimately I am hoping to use it to display unique property records
with a
> radio button selection.  I have done this with the old version of
AjaxCFC
> but when that solution would get the form submitted the form
elements would
> not show up on the action page if using FireFox so was hoping maybe
to have
> better luck with jQuery in the mix.
>
> --
> Aaron Rouse
> http://www.happyhacker.com/
>

#1524 From: "Aaron Rouse" <aaron.rouse@...>
Date: Mon Dec 10, 2007 12:27 am
Subject: AjaxCFC + jQuery
aaron_rouse
Offline Offline
Send Email Send Email
 
I was trying to run the examples that come with the latest Alpha of AjaxCFC with jQuery and get an error with the first DWRCompatibility.query example(Index.cfm of that directory).  The error pops up with a JS confirmation box about a critical error happening when try the "Client Side" box and when I click ok to view the error it states:

__json__:{"recordcount":1,"columnlist":"fname,id,lname,location,phone","data":{"fname":["Rob"],"id":[1],"lname":["Gonda"],"location":["Florida"],"phone":["954-555-5555"]}}

Guess first thing I ought to ask is should the example work or have the examples not been finished?

The "Server Side" example works.

Ultimately I am hoping to use it to display unique property records with a radio button selection.  I have done this with the old version of AjaxCFC but when that solution would get the form submitted the form elements would not show up on the action page if using FireFox so was hoping maybe to have better luck with jQuery in the mix.

--
Aaron Rouse
http://www.happyhacker.com/

Messages 1524 - 1554 of 1584   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help