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...
Want to share photos of your group with the world? Add a group photo to Flickr.

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 1553 - 1583 of 1584   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#1583 From: "Dave Phillips" <phillips.david.lee@...>
Date: Mon Jun 22, 2009 3:13 pm
Subject: ajaxCFC with reverse proxy (web seal or otherwise)
davephillips...
Offline Offline
Send Email Send Email
 
Hi all,

I'm trying to get my implementation of ajaxCFC to work with a reverse proxy.  I
have confirmed that the request gets through to the CFC and the method in the
CFC executes successfully.  But then I get an [object error] on the client side.
I have also confirmed I never make it to my callback function.  It seems like
(I'm guessing here) the server is having a problem getting the response back to
the client.

The same code works fine when access directly and NOT through the reverse proxy.

Anyone had any experience for this, or have any suggestions on how to solve the
problem?

Thanks!

Dave Phillips

#1582 From: "dronski" <dronski@...>
Date: Thu Feb 26, 2009 7:14 pm
Subject: Re: multiple CFC files?
dronski
Offline Offline
Send Email Send Email
 
Never mind.  I just realized I forgot to put the function name in quotes.


(slowly crawling under the desk in shame....)

#1581 From: "dronski" <dronski@...>
Date: Thu Feb 26, 2009 7:03 pm
Subject: multiple CFC files?
dronski
Offline Offline
Send Email Send Email
 
I was trying to organize my code somewhat and separate my cfc files.  I can't
seem to
access anything other than the first CFC file.  e.g.,
$.AjaxCFC({
    url: "model/query.cfc",
    method: qryFunctionName,
    data: params,
    serialization: "wddx",
    success: function(r) {
       $.unblockUI();
 	  	 if(r=='') {
 	  		 doQueryResults("<p>No Transaction Found</p>");

 	  	 }
 	  	 else {
 	  		 window.location.href=r;
 	  	 }
       }
});
 		 $.blockUI({ css: {
             border: 'none',
             padding: '15px',
             backgroundColor: '#000',
             '-webkit-border-radius': '10px',
             '-moz-border-radius': '10px',
             opacity: '0',
             color: '#fff'
         } });



}


Works correctly.  But in the same file,

function updateTrackingNumber(TransID) {
var params={};
params.TransID=TransID;
params.TrackingNumber=$('#CertTrackNum').val();

$.AjaxCFC({
    url: "model/Status.cfc",
    method: UpdateCertTrackNum,
    data: params,
    serialization: "wddx",
    success: function(r) {
 	  	 $("#CertTrackNum").css("color","green");
       $.unblockUI();
       }
});
 		 $.blockUI({ css: {
             border: 'none',
             padding: '15px',
             backgroundColor: '#000',
             '-webkit-border-radius': '10px',
             '-moz-border-radius': '10px',
             opacity: '0',
             color: '#fff'
         } });
}

throws an "UpdateCertTrackNum is not defined" error.  I even tried to do a
<cfinvoke> of
the init function just to see if it would help.  It DID call that properly, but
didn't help.  Is
there somewhere else I need to initialize the CFC?  Is extending AJAX with more
than one
CFC even possible?

TIA,
bob

#1580 From: Chris Jordan <cjordan@...>
Date: Thu Feb 12, 2009 4:21 pm
Subject: Re: accessing value(s) from json array
c_s_jordan
Offline Offline
Send Email Send Email
 
This is a matter of case sensitivity. JavaScript is case sensitive, and for some reason object properties are returned all uppercased. Look at the dump and you'll see that it's "PRICE" not "price". This was a big gotcha for me when I started too.

Just use aUPSprice[0].PRICE and you should be fine. :o)

Cheers,
Chris

On Thu, Feb 12, 2009 at 9:30 AM, josegura93 <jsegura01@...> wrote:

I having a tough time trying to access a value from my return. Below
is my ajax call:

$.AjaxCFC({
url: '/cfc/ups.cfc',
method: 'getShippingOptions',
data: {'shiptozip': zipVal,'weight': weightVal,
'serviceCode': servCodeVal},
unnamedargs: false,
serialization: 'json',
success: function(aUPSprice){
alert(aUPSprice[0].price); /* looking for
price value but alert displays "Undefined" */
$.dump(aUPSprice);
}
});
})

The dump:
array
0[object]
object
PRICE [number] 6.89
OPTION [string] Ground

1[object]
object
PRICE [number] 7.32
OPTION [string] 3 Day Select





--
http://cjordan.us

#1579 From: "josegura93" <jsegura01@...>
Date: Thu Feb 12, 2009 3:30 pm
Subject: accessing value(s) from json array
josegura93
Offline Offline
Send Email Send Email
 
I having a tough time trying to access a value from my return.  Below
is my ajax call:

                 $.AjaxCFC({
                     url: '/cfc/ups.cfc',
                     method: 'getShippingOptions',
                     data: {'shiptozip': zipVal,'weight': weightVal,
'serviceCode': servCodeVal},
                     unnamedargs: false,
                     serialization: 'json',
                     success: function(aUPSprice){
                         alert(aUPSprice[0].price);  /* looking for
price value but alert displays "Undefined" */
                         $.dump(aUPSprice);
                         }
                 });
             })

The dump:
array
0[object]
   object
     PRICE [number] 6.89
     OPTION [string] Ground

1[object]
   object
     PRICE [number] 7.32
     OPTION [string] 3 Day Select

#1578 From: David Phillips <phillips.david.lee@...>
Date: Wed Jan 7, 2009 1:21 am
Subject: RE: strange issue occurring....
davephillips...
Offline Offline
Send Email Send Email
 

No, they are coming from different IP addresses (internal to our corporate network) and they are client machines.  There are other get requests from the same IP addresses in the same time frame as well, so it’s obvious they are doing something that is making ajax calls.   I just can’t find anywhere where it would call without the filename.

 

Thanks,

 

Dave

 

From: ajaxcfc@yahoogroups.com [mailto:ajaxcfc@yahoogroups.com] On Behalf Of Kym Kovan
Sent: Tuesday, January 06, 2009 6:27 PM
To: ajaxcfc@yahoogroups.com
Subject: Re: [ajaxcfc] strange issue occurring....

 

Hi Dave,

Looking in the web logs are these calls to index.cfm all from the same
IP address block? I am thinking it might be a (PC) firewall doing
advanced lookups from its base. We had a similar issue with TrendMicro
doing an advanced lookup of sites and all the source IPs were from the
same IP addresses as TrendMicro themselves.

Kym

Dave Phillips wrote:
>
>
> Hi all,
>
> I don't know if this is a problem with the ajaxCFC or not so I'm
> hoping someone else has experienced it.
>
> We have the ajax files in:
>
> /assets/ajax
>
> Now, for some reason, we are finding the following errors in our logs:
>
> /assets/ajax/index.cfm / 404 Object not found
>
> index.cfm is, of course, our default document in the web server for
> this website (which propagates down to all the folders in it). And,
> of course, we don't have an index.cfm in that folder. I have
> searched our code to see if anyone referenced this folder without
> specifying a file, or the index.cfm, but I have not found any code
> like that. Also, it is happening in more than one application with
> the same structure and same ajaxCFC implementation.
>
> Best I can tell, this is occurring on 'some' calls to our
> ajaxfunctions.cfc file which is in that directory. In the web logs,
> I see the GET for assets/ajax/ajaxfunctions.cfc and then I see it for
> assets/ajax/index.cfm.
>
> Has anyone else experienced this? It is intermitted, and I cannot
> reproduce it yet, so I am stumped.
>

--

Yours,

Kym Kovan
mbcomms.net.au


#1577 From: Kym Kovan <dev-lists@...>
Date: Wed Jan 7, 2009 12:26 am
Subject: Re: strange issue occurring....
kymkaway
Offline Offline
Send Email Send Email
 
Hi Dave,

Looking in the web logs are these calls to index.cfm all from the same
IP address block? I am thinking it might be a (PC) firewall doing
advanced lookups from its base. We had a similar issue with TrendMicro
doing an advanced lookup of sites and all the source IPs were from the
same IP addresses as TrendMicro themselves.


Kym


Dave Phillips wrote:
>
>
> Hi all,
>
> I don't know if this is a problem with the ajaxCFC or not so I'm
> hoping someone else has experienced it.
>
> We have the ajax files in:
>
> /assets/ajax
>
> Now, for some reason, we are finding the following errors in our logs:
>
> /assets/ajax/index.cfm / 404 Object not found
>
> index.cfm is, of course, our default document in the web server for
> this website (which propagates down to all the folders in it). And,
> of course, we don't have an index.cfm in that folder. I have
> searched our code to see if anyone referenced this folder without
> specifying a file, or the index.cfm, but I have not found any code
> like that. Also, it is happening in more than one application with
> the same structure and same ajaxCFC implementation.
>
> Best I can tell, this is occurring on 'some' calls to our
> ajaxfunctions.cfc file which is in that directory. In the web logs,
> I see the GET for assets/ajax/ajaxfunctions.cfc and then I see it for
> assets/ajax/index.cfm.
>
> Has anyone else experienced this? It is intermitted, and I cannot
> reproduce it yet, so I am stumped.
>

--

Yours,

Kym Kovan
mbcomms.net.au

#1576 From: "Dave Phillips" <phillips.david.lee@...>
Date: Tue Jan 6, 2009 5:21 pm
Subject: strange issue occurring....
davephillips...
Offline Offline
Send Email Send Email
 
Hi all,

I don't know if this is a problem with the ajaxCFC or not so I'm
hoping someone else has experienced it.

We have the ajax files in:

/assets/ajax

Now, for some reason, we are finding the following errors in our logs:

/assets/ajax/index.cfm  / 404 Object not found

index.cfm is, of course, our default document in the web server for
this website (which propagates down to all the folders in it).  And,
of course, we don't have an index.cfm in that folder.  I have
searched our code to see if anyone referenced this folder without
specifying a file, or the index.cfm, but I have not found any code
like that.  Also, it is happening in more than one application with
the same structure and same ajaxCFC implementation.

Best I can tell, this is occurring on 'some' calls to our
ajaxfunctions.cfc file which is in that directory.  In the web logs,
I see the GET for assets/ajax/ajaxfunctions.cfc and then I see it for
assets/ajax/index.cfm.

Has anyone else experienced this?  It is intermitted, and I cannot
reproduce it yet, so I am stumped.

Thanks!

Dave Phillips

#1575 From: "Aaron Rouse" <aaron.rouse@...>
Date: Fri Dec 5, 2008 5:20 pm
Subject: Re: ajaxCFC Install
aaron_rouse
Offline Offline
Send Email Send Email
 
Could you not just have it in a virtual mapping?

On Fri, Dec 5, 2008 at 10:47 AM, Ryan <ksu_stud@...> wrote:

Is it possible have a single set of ajaxCFC files in my InetPub
directory instead of having a copy for each web site?

Ryan




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

#1574 From: john.mcdonald@...
Date: Fri Dec 5, 2008 5:07 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  12/04/2008 and will not return until
12/09/2008.

I will respond to your message when I return.
If your issue is urgent, you may want to contact the Seagate IT HelpDesk,

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

If your issue is web related, IsoFax related, or RightNow Data related,
please contact darren.benson@...

Thanks
John McDonald

#1573 From: "Ryan" <ksu_stud@...>
Date: Fri Dec 5, 2008 4:47 pm
Subject: ajaxCFC Install
phidelt1350
Offline Offline
Send Email Send Email
 
Is it possible have a single set of ajaxCFC files in my InetPub
directory instead of having a copy for each web site?

Ryan

#1572 From: "Ryan" <ksu_stud@...>
Date: Tue Sep 2, 2008 2:02 pm
Subject: Re: JS Style Not working...
phidelt1350
Offline Offline
Send Email Send Email
 
That worked!!  Thanks!

Ryan


--- In ajaxcfc@yahoogroups.com, "Erick Rodriguez"
<tb.erick.rodriguez@...> wrote:
>
> Better to use:
>
> $('#id').css({"display":"block"});
>
>
>
> From: ajaxcfc@yahoogroups.com [mailto:ajaxcfc@yahoogroups.com] On
Behalf Of
> Ryan
> Sent: Monday, September 01, 2008 11:39 PM
> To: ajaxcfc@yahoogroups.com
> Subject: [ajaxcfc] JS Style Not working...
>
>
>
> Using cfajax.... why is this not working..
>
> $('#outerSiteMesage').style.display='block';
>
> This is the error I'm getting..
>
> "object does not support this property or method"
>
> Any ideas?
>
> Ryan
>

#1571 From: "Erick Rodriguez" <tb.erick.rodriguez@...>
Date: Tue Sep 2, 2008 4:19 am
Subject: RE: JS Style Not working...
tberickrodri...
Offline Offline
Send Email Send Email
 

Better to use:

$(‘#id’).css({“display”:”block”});

 

From: ajaxcfc@yahoogroups.com [mailto:ajaxcfc@yahoogroups.com] On Behalf Of Ryan
Sent: Monday, September 01, 2008 11:39 PM
To: ajaxcfc@yahoogroups.com
Subject: [ajaxcfc] JS Style Not working...

 

Using cfajax.... why is this not working..

$('#outerSiteMesage').style.display='block';

This is the error I'm getting..

"object does not support this property or method"

Any ideas?

Ryan



__________ Information from ESET NOD32 Antivirus, version of virus signature database 3402 (20080831) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

#1570 From: "Ryan" <ksu_stud@...>
Date: Tue Sep 2, 2008 3:40 am
Subject: Re: JS Style Not working...
phidelt1350
Offline Offline
Send Email Send Email
 
Sorry I'm using ajaxCFC... not cfajax.. slip of the fingers

--- In ajaxcfc@yahoogroups.com, "Ryan" <ksu_stud@...> wrote:
>
> Using cfajax.... why is this not working..
>
> $('#outerSiteMesage').style.display='block';
>
> This is the error I'm getting..
>
> "object does not support this property or method"
>
> Any ideas?
>
> Ryan
>

#1569 From: "Ryan" <ksu_stud@...>
Date: Tue Sep 2, 2008 3:38 am
Subject: JS Style Not working...
phidelt1350
Offline Offline
Send Email Send Email
 
Using cfajax.... why is this not working..

$('#outerSiteMesage').style.display='block';

This is the error I'm getting..

"object does not support this property or method"

Any ideas?

Ryan

#1568 From: "software7788" <software7788@...>
Date: Fri Jul 25, 2008 8:35 am
Subject: Business Software
software7788
Offline Offline
Send Email Send Email
 
#1567 From: "SpillsMills" <spillsmills@...>
Date: Wed Jun 11, 2008 11:06 pm
Subject: Project Status
SpillsMills
Offline Offline
Send Email Send Email
 
I'm just wondering what the status of this project is? Jquery has made
a lot of changes since the last version of this framework and CF
frameworks in general like MG2, Coldbox, Mach-II etc... have evolved.
Where do you see this project headed or will the newer frameworks
lesson the need for ajaxCFC.

Thanks

#1566 From: Farah Omar <ofarah24@...>
Date: Wed May 21, 2008 8:10 pm
Subject: Re: Re: Calling a function from another function
ofarah24
Offline Offline
Send Email Send Email
 
Thank you so  much for your help. It is working now.
 
Farrah

geneaiello123 <programmer_neo@...> wrote:
I would recommend, that your getRecordsResult handle the query as
well as the building of your HTML table. Don't use javascript to
build the table.
In your CFC use just use cfsavecontent, and build your table within
there, then just have your CFC return a string rather than a query.
Also with that same function, make a call to your getServiceType
function... in short all of that should be handled on the server
witin 1 CFC (which can make calls to other CFCs if need be), and just
return a string and display it. Why make multiple trips to the
server? This will get around the problem you are having with a delay.

--- In ajaxcfc@yahoogroups.com, "ofarah24" <ofarah24@...> wrote:
>
> I am trying to call a ajax function from another function. It is
> working this way: I send some search criteria to searchRecords and
> searchRecords return multiple records and display them in a table.
> While displaying the results in the table, I called another
function
> and pass it the transactionID to get the services done in each
> transaction. I am not getting any services back. But the weird part
> is that if I put 'alert(serviceType);' right before displaying
> serviceType in the table, the servicetypes appear just fine in the
> table. I don't know why it works with alert() but not without it.
At
> first, I was thinking that may there is some delay in getting the
> results from the 2nd function and the table is displayed before the
> results get back but I tried putting delay code and it still
doesn't
> work. I think I am missing something small here.
>
> //------------------ 1st function
> function searchRecords(form,clientName, staffName, topic,
> specificDate, fromDate, toDate, searchService,transactionID,
> department)
> {
> displayClientInfo = form;
> var oWddx = new WddxSerializer();
> var _o = {form: form, staffName: staffName,
> specificDate: specificDate, fromDate: fromDate, toDate: toDate};
> DWREngine._execute(_ajaxConfig._cfscriptLocation,
> null, 'getRecords', oWddx.serialize(_o), getRecordsResult);
> }
>
> //Call back function for searchRecords
> function getRecordsResult (r) {
> if(r.getRowCount() > 0){
> var out = '<br><table border=1 cellpadding=3
> cellspacing=3><tr><th>Select</th><th>ID</th><th>Client
> Name</th><th>Staff Name</th>';
> out= out + '<th>Date</th><th>Service
> Type</th>';
> ....some code here...
>
> getServices(r.id[x]);
> out = out + "<td valign='top'>&nbsp;" +
> serviceType + "</td>";
> }
> $('searchResults').innerHTML =out + '</table>';
> }
>
>
> //------------------ 2nd function
> function getServices(transID)
> {
> DWREngine._execute(_ajaxConfig._cfscriptLocation,
> null, 'getServiceType', transID, dosomething);
> }
>
> //Call back function for getServices
> function dosomething (r)
> {
> serviceType ='';
> if(r.getRowCount() > 0){
> for (var x = 0; x < r.getRowCount(); x++)
> {
> serviceType = serviceType + r.service[x]
> + ",";
> }
> }
> }
>



#1565 From: "geneaiello123" <programmer_neo@...>
Date: Wed May 21, 2008 5:23 pm
Subject: Re: Calling a function from another function
geneaiello123
Online Now Online Now
Send Email Send Email
 
I would recommend, that your getRecordsResult handle the query as
well as the building of your HTML table. Don't use javascript to
build the table.
In your CFC use just use cfsavecontent, and build your table within
there, then just have your CFC return a string rather than a query.
Also with that same function, make a call to your getServiceType
function... in short all of that should be handled on the server
witin 1 CFC (which can make calls to other CFCs if need be), and just
return a string and display it. Why make multiple trips to the
server? This will get around the problem you are having with a delay.

--- In ajaxcfc@yahoogroups.com, "ofarah24" <ofarah24@...> wrote:
>
> I am trying to call a ajax function from another function. It is
> working this way: I send some search criteria to searchRecords and
> searchRecords return multiple records and display them in a table.
> While displaying the results in the table, I called another
function
> and pass it the transactionID to get the services done in each
> transaction. I am not getting any services back. But the weird part
> is that if I put 'alert(serviceType);' right before displaying
> serviceType in the table, the servicetypes appear just fine in the
> table. I don't know why it works with alert() but not without it.
At
> first, I was thinking that may there is some delay in getting the
> results from the 2nd function and the table is displayed before the
> results get back but I tried putting delay code and it still
doesn't
> work. I think I am missing something small here.
>
> //------------------ 1st function
>  function searchRecords(form,clientName, staffName, topic,
> specificDate, fromDate, toDate, searchService,transactionID,
> department)
>  {
> 	 displayClientInfo = form;
> 	 var oWddx = new WddxSerializer();
> 	 var _o = {form: form, staffName: staffName,
> specificDate: specificDate, fromDate: fromDate, toDate: toDate};
> 	 DWREngine._execute(_ajaxConfig._cfscriptLocation,
> null, 'getRecords', oWddx.serialize(_o), getRecordsResult);
>  }
>
> //Call back function for searchRecords
>  function getRecordsResult (r) {
> 	 if(r.getRowCount() > 0){
> 		 var out = '<br><table border=1 cellpadding=3
> cellspacing=3><tr><th>Select</th><th>ID</th><th>Client
> Name</th><th>Staff Name</th>';
> 		 out= out + '<th>Date</th><th>Service
> Type</th>';
>                         ....some code here...
>
> 		 getServices(r.id[x]);
> 		 out = out + "<td valign='top'>&nbsp;" +
> serviceType + "</td>";
> 	 }
> 	 $('searchResults').innerHTML =out + '</table>';
>  }
>
>
> //------------------ 2nd function
>  function getServices(transID)
>  {
> 	 DWREngine._execute(_ajaxConfig._cfscriptLocation,
> null, 'getServiceType', transID, dosomething);
>  }
>
> //Call back function for getServices
>  function dosomething (r)
>  {
> 	 serviceType ='';
> 	 if(r.getRowCount() > 0){
> 		 for (var x = 0; x < r.getRowCount(); x++)
> 		 {
> 		 serviceType = serviceType + r.service[x]
> + ",";
> 		 }
> 	 }
>  }
>

#1564 From: "josegura93" <jsegura01@...>
Date: Wed May 21, 2008 3:56 am
Subject: ajaxcfc and passing form variables using jquery form plug-in
josegura93
Offline Offline
Send Email Send Email
 
I'm using the form plug-in for validation but I'm having a tough time
trying pass the form variables to AjaxCFC. I'm using formSerialize()
which returns "name1=value1&name2=value2" but I don't know how to pass
that format or convert for data: {} since it's looking for
{"name1":"value1",..}

Below is part of my code after validation:

var formitems = $("#myForm").formSerialize();

$.AjaxCFC({
	 url: 'sgcfc/projects.cfc',
	 method: 'insertProjTime',
	 data: formitem,
	 unnamedargs: false,
	 serialization: 'json',
	 success: function(r){
         // some code
	 }
})

Any suggestion?

#1563 From: "ofarah24" <ofarah24@...>
Date: Tue May 20, 2008 8:41 pm
Subject: Calling a function from another function
ofarah24
Offline Offline
Send Email Send Email
 
I am trying to call a ajax function from another function. It is
working this way: I send some search criteria to searchRecords and
searchRecords return multiple records and display them in a table.
While displaying the results in the table, I called another function
and pass it the transactionID to get the services done in each
transaction. I am not getting any services back. But the weird part
is that if I put 'alert(serviceType);' right before displaying
serviceType in the table, the servicetypes appear just fine in the
table. I don't know why it works with alert() but not without it. At
first, I was thinking that may there is some delay in getting the
results from the 2nd function and the table is displayed before the
results get back but I tried putting delay code and it still doesn't
work. I think I am missing something small here.

//------------------ 1st function
	 function searchRecords(form,clientName, staffName, topic,
specificDate, fromDate, toDate, searchService,transactionID,
department)
	 {
		 displayClientInfo = form;
		 var oWddx = new WddxSerializer();
		 var _o = {form: form, staffName: staffName,
specificDate: specificDate, fromDate: fromDate, toDate: toDate};
		 DWREngine._execute(_ajaxConfig._cfscriptLocation,
null, 'getRecords', oWddx.serialize(_o), getRecordsResult);
	 }

//Call back function for searchRecords
	 function getRecordsResult (r) {
		 if(r.getRowCount() > 0){
			 var out = '<br><table border=1 cellpadding=3
cellspacing=3><tr><th>Select</th><th>ID</th><th>Client
Name</th><th>Staff Name</th>';
			 out= out + '<th>Date</th><th>Service
Type</th>';
                         ....some code here...

			 getServices(r.id[x]);
			 out = out + "<td valign='top'>&nbsp;" +
serviceType + "</td>";
		 }
		 $('searchResults').innerHTML =out + '</table>';
	 }


//------------------ 2nd function
	 function getServices(transID)
	 {
		 DWREngine._execute(_ajaxConfig._cfscriptLocation,
null, 'getServiceType', transID, dosomething);
	 }

//Call back function for getServices
	 function dosomething (r)
	 {
		 serviceType ='';
		 if(r.getRowCount() > 0){
			 for (var x = 0; x < r.getRowCount(); x++)
			 {
			 serviceType = serviceType + r.service[x]
+ ",";
			 }
		 }
	 }

#1562 From: Chris Jordan <cjordan@...>
Date: Wed Apr 16, 2008 10:28 pm
Subject: Re: Re: ajaxCFC w/ jquery
c_s_jordan
Offline Offline
Send Email Send Email
 

Hi Ryan,

The .val() function works on an element that has a value attribute, like an input type text:

   <input type="text" name="messageTitle" id="messageTitle" value="somevalue">

.val() would return (or set depending on how you called it) the value="" portion of the element.

Textareas don't have a value="" attribute. They have an opening and closing tag and everything in between that appears in the text area:

   <textarea id="messageBody">
      I appear in the text box called 'messageBody'
   </textarea>

So what you want to use there is either the .text() or .html() functions. I can't off hand remember the difference between the two, but the jQuery docs would spell it out, I'm sure. Try one of those, and I'm sure you'll be on your way. :o)

Cheers!
Chris


----- Original Message -----
From: "Ryan" <ksu_stud@...>
To: ajaxcfc@yahoogroups.com
Sent: Wednesday, April 16, 2008 9:39:44 AM (GMT-0600) America/Chicago
Subject: [ajaxcfc] Re: ajaxCFC w/ jquery


Chris,
Thanks again for your help I have gotten things working again.

One more issue. I am trying to clear the values out of a text field
and a textarea with the jQuery syntax.. the text field (messageTitle)
clears but the textarea (messageBody) does not. Any ideas?

$('#messageBody').val('');
$('#messageTitle').val('');

Obviously I know that textareas do not have a value parameter but I'm
pretty sure that the .value property worked with ajaxCFC standalone.
I've tried .text('') and .html('') with no luck. How can I clear out
the contents of a text area?

Thanks,
Ryan

--- In ajaxcfc@yahoogroups.com, Chris Jordan <cjordan@...> wrote:
>
> Ryan,
>
> The proper jQuery that you want is:
>
> $('#layerSpan').html(getResult);
>
> Check out this page (http://docs.jquery.com/Manipulation) for some
useful jQuery functions along these lines.
>
> Not sure I understand the question about the callback function,
sorry. Maybe ask it again, and I'll pay attention this time. ;o)
>
> As for snippets, check out cfeclipse.org
(http://cfeclipse.org/cfeclipsetv.cfm). The link I just gave goes to
a video section of the site, and the second video clip down (07... I
think) is about using snippets. It's pretty cool. You can (or
could... I can't seem to find anything about it right now) connect to
a shared snippet server and automatically get loads and loads of
predefined snippets. I usually stick to using my own handful of them,
though.
>
> Hope this stuff helps. :o)
>
> Chris
>
> ----- Original Message -----
> From: "Ryan" <ksu_stud@...>
> To: ajaxcfc@yahoogroups.com
> Sent: Wednesday, April 9, 2008 8:10:54 AM (GMT-0600)
America/Chicago
> Subject: [ajaxcfc] Re: ajaxCFC w/ jquery
>
>
>
>
>
>
>
> Chris,
> Thanks again for your help. Your suggestion did work and the ajax
> code picked up the value for locationID. But now my return function
> won't work. I'm guessing it is the same sort of deal needing the #
> sign. Can you help me out here?
>
> function showPlayers(getResult)
> {
> $('#layerSpan').innerHTML = getResult;
> }
>
> I did take a look at your tutorials last night and it appears the
> game has changed!! I can't believe how different it appears to be.
> Is there a new way I shoudl be calling my return function above?
>
> Also can you point me in a good spot to learn about snippets? You
> mentioned it on your blog but I've never used them and I do use
> CFEclipse.
>
> Ryan
>
> --- In ajaxcfc@yahoogroups.com , Chris Jordan <cjordan@> wrote:
> >
> > Ryan,
> >
> > The first thing that jumps out at me is that in your line of
jQuery
> there, you're getting an id, but you're missing the pound sign that
> goes along with doing that. In other words, that line should read:
> >
> > locationId = $('#locationId').value;
> >
> > The other thing is that the '.value' part should be '.val()'. So,
> >
> > locationId = $('#locationId').val()
> >
> >
> > See if any of that helps. Also, have you checked out the
tutorials
> on my blog? ( http://cjordan.us/index.cfm/AjaxCFC )
> >
> > Hope this helps,
> > Chris
> >
> > ----- Original Message -----
> > From: "Ryan" <ksu_stud@>
> > To: ajaxcfc@yahoogroups.com
> > Sent: Tuesday, April 8, 2008 4:47:58 PM (GMT-0600)
America/Chicago
> > Subject: [ajaxcfc] ajaxCFC w/ jquery
> >
> >
> >
> >
> >
> >
> >
> > Hey Guys,
> > It's been a while but I'm back writing code. I downloaded the
> latest
> > version of ajaxCFC which has jQuery included. The ajaxCFC code
> seems
> > to be working fine until I try to include the jquery.js file like
> so
> >
> > <script src="../ajaxcfc/branches/jquery/core/js/jquery.js"
> > type="text/javascript"></script>
> >
> > Once I inlcude the file I start getting undefined errors when
> making
> > simple calls like...
> >
> > locationID = $('locationID').value;
> >
> > Any ideas? I think jquery uses the $ function, is that the issue?
> >
> > Thanks,
> > Ryan
> >
>


#1560 From: Chris Jordan <cjordan@...>
Date: Wed Apr 9, 2008 3:31 pm
Subject: Re: Re: ajaxCFC w/ jquery
c_s_jordan
Offline Offline
Send Email Send Email
 
Ryan,

The proper jQuery that you want is:

   $('#layerSpan').html(getResult);

Check out this page (http://docs.jquery.com/Manipulation) for some useful jQuery functions along these lines.

Not sure I understand the question about the callback function, sorry. Maybe ask it again, and I'll pay attention this time. ;o)

As for snippets, check out cfeclipse.org (http://cfeclipse.org/cfeclipsetv.cfm). The link I just gave goes to a video section of the site, and the second video clip down (07... I think) is about using snippets. It's pretty cool. You can (or could... I can't seem to find anything about it right now) connect to a shared snippet server and automatically get loads and loads of predefined snippets. I usually stick to using my own handful of them, though.

Hope this stuff helps. :o)

Chris

----- Original Message -----
From: "Ryan" <ksu_stud@...>
To: ajaxcfc@yahoogroups.com
Sent: Wednesday, April 9, 2008 8:10:54 AM (GMT-0600) America/Chicago
Subject: [ajaxcfc] Re: ajaxCFC w/ jquery

Chris,
Thanks again for your help. Your suggestion did work and the ajax
code picked up the value for locationID. But now my return function
won't work. I'm guessing it is the same sort of deal needing the #
sign. Can you help me out here?

function showPlayers(getResult)
{
$('#layerSpan').innerHTML = getResult;
}

I did take a look at your tutorials last night and it appears the
game has changed!! I can't believe how different it appears to be.
Is there a new way I shoudl be calling my return function above?

Also can you point me in a good spot to learn about snippets? You
mentioned it on your blog but I've never used them and I do use
CFEclipse.

Ryan

--- In ajaxcfc@yahoogroups.com, Chris Jordan <cjordan@...> wrote:
>
> Ryan,
>
> The first thing that jumps out at me is that in your line of jQuery
there, you're getting an id, but you're missing the pound sign that
goes along with doing that. In other words, that line should read:
>
> locationId = $('#locationId').value;
>
> The other thing is that the '.value' part should be '.val()'. So,
>
> locationId = $('#locationId').val()
>
>
> See if any of that helps. Also, have you checked out the tutorials
on my blog? (http://cjordan.us/index.cfm/AjaxCFC)
>
> Hope this helps,
> Chris
>
> ----- Original Message -----
> From: "Ryan" <ksu_stud@...>
> To: ajaxcfc@yahoogroups.com
> Sent: Tuesday, April 8, 2008 4:47:58 PM (GMT-0600) America/Chicago
> Subject: [ajaxcfc] ajaxCFC w/ jquery
>
>
>
>
>
>
>
> Hey Guys,
> It's been a while but I'm back writing code. I downloaded the
latest
> version of ajaxCFC which has jQuery included. The ajaxCFC code
seems
> to be working fine until I try to include the jquery.js file like
so
>
> <script src="../ajaxcfc/branches/jquery/core/js/jquery.js"
> type="text/javascript"></script>
>
> Once I inlcude the file I start getting undefined errors when
making
> simple calls like...
>
> locationID = $('locationID').value;
>
> Any ideas? I think jquery uses the $ function, is that the issue?
>
> Thanks,
> Ryan
>


#1559 From: Chris Jordan <cjordan@...>
Date: Wed Apr 9, 2008 3:19 pm
Subject: Re: Re: ajaxCFC w/ jquery
c_s_jordan
Offline Offline
Send Email Send Email
 
Yes. They did. :o) I'll respond to your other post separately. :o)

Chris
----- Original Message -----
From: "Ryan" <ksu_stud@...>
To: ajaxcfc@yahoogroups.com
Sent: Tuesday, April 8, 2008 8:14:44 PM (GMT-0600) America/Chicago
Subject: [ajaxcfc] Re: ajaxCFC w/ jquery

Chris,
Thanks as always for the reply. I believe you've helped me on more
than one occasion now. I am going to boot up the work laptop and try
your changes right now.

So they changed some of the ajaxCFC syntax when they incorporated
jquery into the download?

Ryan

--- In ajaxcfc@yahoogroups.com, Chris Jordan <cjordan@...> wrote:
>
> Ryan,
>
> The first thing that jumps out at me is that in your line of jQuery
there, you're getting an id, but you're missing the pound sign that
goes along with doing that. In other words, that line should read:
>
> locationId = $('#locationId').value;
>
> The other thing is that the '.value' part should be '.val()'. So,
>
> locationId = $('#locationId').val()
>
>
> See if any of that helps. Also, have you checked out the tutorials
on my blog? (http://cjordan.us/index.cfm/AjaxCFC)
>
> Hope this helps,
> Chris
>
> ----- Original Message -----
> From: "Ryan" <ksu_stud@...>
> To: ajaxcfc@yahoogroups.com
> Sent: Tuesday, April 8, 2008 4:47:58 PM (GMT-0600) America/Chicago
> Subject: [ajaxcfc] ajaxCFC w/ jquery
>
>
>
>
>
>
>
> Hey Guys,
> It's been a while but I'm back writing code. I downloaded the latest
> version of ajaxCFC which has jQuery included. The ajaxCFC code seems
> to be working fine until I try to include the jquery.js file like so
>
> <script src="../ajaxcfc/branches/jquery/core/js/jquery.js"
> type="text/javascript"></script>
>
> Once I inlcude the file I start getting undefined errors when making
> simple calls like...
>
> locationID = $('locationID').value;
>
> Any ideas? I think jquery uses the $ function, is that the issue?
>
> Thanks,
> Ryan
>


#1558 From: "Ryan" <ksu_stud@...>
Date: Wed Apr 9, 2008 1:10 pm
Subject: Re: ajaxCFC w/ jquery
phidelt1350
Offline Offline
Send Email Send Email
 
Chris,
Thanks again for your help.  Your suggestion did work and the ajax
code picked up the value for locationID.  But now my return function
won't work.  I'm guessing it is the same sort of deal needing the #
sign.  Can you help me out here?


function showPlayers(getResult)
	 {
		 $('#layerSpan').innerHTML = getResult;
         }


I did take a look at your tutorials last night and it appears the
game has changed!!  I can't believe how different it appears to be.
Is there a new way I shoudl be calling my return function above?

Also can you point me in a good spot to learn about snippets?  You
mentioned it on your blog but I've never used them and I do use
CFEclipse.

Ryan



--- In ajaxcfc@yahoogroups.com, Chris Jordan <cjordan@...> wrote:
>
> Ryan,
>
> The first thing that jumps out at me is that in your line of jQuery
there, you're getting an id, but you're missing the pound sign that
goes along with doing that. In other words, that line should read:
>
> locationId = $('#locationId').value;
>
> The other thing is that the '.value' part should be '.val()'. So,
>
> locationId = $('#locationId').val()
>
>
> See if any of that helps. Also, have you checked out the tutorials
on my blog? (http://cjordan.us/index.cfm/AjaxCFC)
>
> Hope this helps,
> Chris
>
> ----- Original Message -----
> From: "Ryan" <ksu_stud@...>
> To: ajaxcfc@yahoogroups.com
> Sent: Tuesday, April 8, 2008 4:47:58 PM (GMT-0600) America/Chicago
> Subject: [ajaxcfc] ajaxCFC w/ jquery
>
>
>
>
>
>
>
> Hey Guys,
> It's been a while but I'm back writing code. I downloaded the
latest
> version of ajaxCFC which has jQuery included. The ajaxCFC code
seems
> to be working fine until I try to include the jquery.js file like
so
>
> <script src="../ajaxcfc/branches/jquery/core/js/jquery.js"
> type="text/javascript"></script>
>
> Once I inlcude the file I start getting undefined errors when
making
> simple calls like...
>
> locationID = $('locationID').value;
>
> Any ideas? I think jquery uses the $ function, is that the issue?
>
> Thanks,
> Ryan
>

#1557 From: "Ryan" <ksu_stud@...>
Date: Wed Apr 9, 2008 1:14 am
Subject: Re: ajaxCFC w/ jquery
phidelt1350
Offline Offline
Send Email Send Email
 
Chris,
Thanks as always for the reply.  I believe you've helped me on more
than one occasion now.  I am going to boot up the work laptop and try
your changes right now.

So they changed some of the ajaxCFC syntax when they incorporated
jquery into the download?

Ryan


--- In ajaxcfc@yahoogroups.com, Chris Jordan <cjordan@...> wrote:
>
> Ryan,
>
> The first thing that jumps out at me is that in your line of jQuery
there, you're getting an id, but you're missing the pound sign that
goes along with doing that. In other words, that line should read:
>
> locationId = $('#locationId').value;
>
> The other thing is that the '.value' part should be '.val()'. So,
>
> locationId = $('#locationId').val()
>
>
> See if any of that helps. Also, have you checked out the tutorials
on my blog? (http://cjordan.us/index.cfm/AjaxCFC)
>
> Hope this helps,
> Chris
>
> ----- Original Message -----
> From: "Ryan" <ksu_stud@...>
> To: ajaxcfc@yahoogroups.com
> Sent: Tuesday, April 8, 2008 4:47:58 PM (GMT-0600) America/Chicago
> Subject: [ajaxcfc] ajaxCFC w/ jquery
>
>
>
>
>
>
>
> Hey Guys,
> It's been a while but I'm back writing code. I downloaded the latest
> version of ajaxCFC which has jQuery included. The ajaxCFC code seems
> to be working fine until I try to include the jquery.js file like so
>
> <script src="../ajaxcfc/branches/jquery/core/js/jquery.js"
> type="text/javascript"></script>
>
> Once I inlcude the file I start getting undefined errors when making
> simple calls like...
>
> locationID = $('locationID').value;
>
> Any ideas? I think jquery uses the $ function, is that the issue?
>
> Thanks,
> Ryan
>

#1556 From: Chris Jordan <cjordan@...>
Date: Tue Apr 8, 2008 9:55 pm
Subject: Re: ajaxCFC w/ jquery
c_s_jordan
Offline Offline
Send Email Send Email
 
Ryan,

The first thing that jumps out at me is that in your line of jQuery there, you're getting an id, but you're missing the pound sign that goes along with doing that. In other words, that line should read:

   locationId = $('#locationId').value;

The other thing is that the '.value' part should be '.val()'. So,

  locationId = $('#locationId').val()


See if any of that helps. Also, have you checked out the tutorials on my blog? (http://cjordan.us/index.cfm/AjaxCFC)

Hope this helps,
Chris

----- Original Message -----
From: "Ryan" <ksu_stud@...>
To: ajaxcfc@yahoogroups.com
Sent: Tuesday, April 8, 2008 4:47:58 PM (GMT-0600) America/Chicago
Subject: [ajaxcfc] ajaxCFC w/ jquery

Hey Guys,
It's been a while but I'm back writing code. I downloaded the latest
version of ajaxCFC which has jQuery included. The ajaxCFC code seems
to be working fine until I try to include the jquery.js file like so

<script src="../ajaxcfc/branches/jquery/core/js/jquery.js"
type="text/javascript"></script>

Once I inlcude the file I start getting undefined errors when making
simple calls like...

locationID = $('locationID').value;

Any ideas? I think jquery uses the $ function, is that the issue?

Thanks,
Ryan


#1555 From: "Ryan" <ksu_stud@...>
Date: Tue Apr 8, 2008 9:47 pm
Subject: ajaxCFC w/ jquery
phidelt1350
Offline Offline
Send Email Send Email
 
Hey Guys,
It's been a while but I'm back writing code.  I downloaded the latest
version of ajaxCFC which has jQuery included.  The ajaxCFC code seems
to be working fine until I try to include the jquery.js file like so

<script src="../ajaxcfc/branches/jquery/core/js/jquery.js"
type="text/javascript"></script>

Once I inlcude the file I start getting undefined errors when making
simple calls like...

locationID =  $('locationID').value;

Any ideas?  I think jquery uses the $ function, is that the issue?

Thanks,
Ryan

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



Messages 1553 - 1583 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