I had this awesome tree that now needs a different sort order. This has a table
of parents and sub parents and then children. I have it working in this order:
P
C //this is
P
C
C
C
C
P
C
P
C
C
C
The parent and child tables have a sort column
Now I need the following sort
Use a public geo-location service:
cfhttp method=get
URL=http://ipinfodb.com/ip_query.php?ip=#cgi.REMOTE_ADDR#;
result=response /
Then use the response XML tree to extract the country or zip:
cfset xmmm = xmlparse(response.filecontent)
cfset countryname = xmmm.response.countryname.xmltext
Firebug?
Are you getting an ajax response? If so, what does the output look like? Is it
a JSON array?
~|
Order the Adobe Coldfusion Anthology now!
You should be doing the following:
head
set all of your global vars first...
script
//global vars
/script
load all scripts after.
script type=text/javascript src=jquery-1.4.2.min.js/script
script type=text/javascript src=jquery.ui/jquery.ui.core.min.js/script
then run the jquery
Ajax Call - OnRequest() - checkUserCredentials.init(client){abort or
continue}
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
I would do user checks in a component from onRequest and then use a proxy cfc
for your ajax requests. Using onRequest, you can check the url and if it is the
proxy cfc, then do your user credential checks before allowing access.
Otherwise, you'll need to use the client scope in your cfc
Even if it is a remote cfc call it's still a request that fires
onSessionStart() and onRequestStart(). I'm not sure what kind of issues you've
heard but it works with me in CF8.0.1+
~|
Order the Adobe Coldfusion Anthology
Shoot. Sorry, I meant to say onRequestStart() not onRequest.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
If you avoid any output in any application methods then it will work
fine and any Ajax framework (JQuery, JSON.js, etc) can convert the
returned code to native JSON. This is why I said invoke a cfc and pass
in the scope(s) of choice in your onRequestStart method.
Can cause problems. The
What? You don't know what null null means? It's pretty self explanatory :)
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
I think it's a date conversion issue. I know, debugging can be
frustrating when it isn't working right.
- Tony Bentley
(sent from iPhone)
On Nov 12, 2010, at 8:01 AM, Robert Harrison rob...@austin-williams.com wrote:
What? You don't know what null null means? It's pretty self explanatory
Here is my opinion:*
templates*
Contains:
object instances to render into HTML, conditionals for output, formatting
methods
Does Not Contain:
dynamically rendered CSS, dynamically rendered JavaScript, patterns,
methods.
also any business, data and file management logic that can be written in
use listgetat(form.checkboxa,1, ) and listgetat(form.checkboxa,2,
) and keep them as one value in the value field in the checkbox
input value=4454 16829 type=checkbox
~|
Order the Adobe Coldfusion Anthology now!
Not sure where this goes in CF5.5. Place it in your error handler.
!---if the request is ajax, throw an error that can be
returned to the client in a basic string and then log the error as usual---
cfset requestHeaders = getHTTPRequestData().headers
Check firebug (how many times do people say this?)
If you throw a 500 and abort after, the client should treat the response as an
error. You need to configure the client too, not just put in cfheader
statusCode=500. Use ALL of my code, not just a fragment.
Thanks Tony! Will the cfheader
Nice work!
- Tony Bentley
(sent from iPhone)
On Nov 11, 2010, at 11:06 AM, Donnie Carvajal
donnie.carva...@transformyx.com wrote:
Hi Tony,
I just realized you were intending for the code to go in the site-wide error
handler and not the custom error handling of the AJAX code. I got
Confusing. Your access is public but you can call it via remote Ajax?
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
Is the content only HTML? You can have one master navigation that links the
HTML pages. You can also have one master page that gets the html document
too. index.cfm?page=about.html, then include the about.html in the master
page.
Okay, so I think you hit it Dave. I just need to shorten the session to 15 or
20 minutes. The system already requires a login when the user closes the
browser so why not just shorten the timeout? I've already have the user
sessions stored in a cookie so I was close, but didn't think about why
So I have an app that uses cflogin, which works great if the user logs in and
out from the same browser. Now here is where I am stumped:
-User logs in, then closes the browser
-System does not allow the same user to be logged in more than once
-System logs all logged in users
-System removes
Yeah but their session expires a couple of hours after they close the
browser. So I could expire the session at a shorter timespan but if I can do
it when the browser closes, that would be better.
On Fri, Nov 5, 2010 at 4:50 PM, Russ Michaels r...@michaels.me.uk wrote:
Arn't they logged
What is an NTFS user? NTFS is a file system format, which has nothing to do
with user permissions. Do you mean to say that you are mapped to a NTFS
drive like an external hard disk?
~|
Order the Adobe Coldfusion Anthology now!
Nice Dave, not only did you answer the question but you also interpreted
incorrect acronyms. :)
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Perfect! Thanks Leigh.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
cfdocumentitem type=header
cfif cfdocument.currentpagenumber gt 1
//this does not compute!
/cfif
/cfdocumentitem
Any way around this?
~|
Order the Adobe Coldfusion Anthology now!
function swapImages(imageName) {
$.get('/shop/act_getBeautyImage.cfm?beautyImage='+ imageName +
'width=372height=465',{},function(data) {
$(#beautyImage).html(data).fadeIn('slow');
});
}
~|
Order the Adobe
Show the code on your request page. It's probably because you need an event
to fire from the request page after the image is finished loading.
~|
Order the Adobe Coldfusion Anthology now!
Really, you need to detect when the image is finished loading completely.
Here, check out my source code: http://tonybentley.com/test/test.html
~|
Order the Adobe Coldfusion Anthology now!
I am trying to catch this error type but it is not passing through onError in
the Application Class. It simply is evaluated and thrown as is. How do I catch
it without a try/catch?
~|
Order the Adobe Coldfusion Anthology now!
So basically if there is a typo in the syntax and the code does not compile
it will throw an error and I cannot catch it? Hmmm... I guess I need to
figure out something else.
~|
Order the Adobe Coldfusion Anthology now!
Dave,
You are correct but stuff slips through the cracks. It's how well you can
track back the error to the source when it occurs that will dictate if the
code will be fixed when or if it happens. I can show a pretty nice user
friendly error, but the question remains the same. How will I track
How do you catch compile time errors when they occur? Regardless if a
template was tested or not. I understand best practices and that your code
should be tested but it doesn't mean it will never happen. So when it does,
how do you deal with it? If I get a server error from my applications, I get
Okay so running the code is gonna have to be the answer. The original reason
for asking was because in my Ajax app I was not able to pass a custom header
if I got a compile time error so catching it was a bit more difficult. It
makes sense on a page request but an ajax request could be messy.
Why didn't Adobe fix some of the simple needed changes in CF9 for cfdocument? I
have no idea.
Known issues that suck:
-THEAD does not carry over on page break. The solution? Use cfreportbuilder
(god help me).
- Border collapse does not work. The solution? Write some really funky inline
I usually locate to another page which holds the cfheader code. What ends up
happening when you locate to another page is you are never redirected and
the page prompts to download. Doing it in jquery is unnecessary unless you
want to use a wait icon to ensure the processing is finished before
I spent some time trying to expose the methods in different structures with
different access layers and it looks like the methods will not show up (as a
structure) when returning out as json, web service or any other remote call. So
basically, I was concerned that creating instances of objects
Okay, let me come up with something that would explain my situation better.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
I have a cfc that gets instantiated and then stored in an array. I have a bunch
of different objects (arrays, queries, structures, etc) in the cfc which all
gets used but because of the way I am storing them, the methods can be called
and I want to prevent that.
So here is an example of my
I was hoping to shortcut the process of resetting the 'this' scope to a
different scope for the sake of saving time. So you're saying that the only way
is to specifically call on the structure members?
returnObject = StructNew();
returnObject.id = this.id;
returnObject.name = this.name;
return
Thanks Matt. I think I understand the difference between the two
scopes and why not to use the this scope. For the very reason I am
needing! In most cases it isn't a problem but when methods are exposed
it becomes apparent.
- Tony Bentley
(sent from iPhone)
On Oct 5, 2010, at 3:11 PM, Judah
composition over inheritance?
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
On Oct 5, 2010, at 8:10 PM, Sean Corfield wrote:
On Tue, Oct 5, 2010 at 2:12 PM, Tony Bentley
cascadefreehee...@gmail.com wrote:
I have a cfc that gets instantiated and then stored in an array. I have a
bunch of different objects (arrays, queries, structures, etc) in the cfc
which all
I don't understand your implementation so I can't answer the question properly.
Why the fascination with cfgrid? Are you updating text input fields in the grid
or is it some other functionality that you want to implement from cfgrid?
Sorting, paging, etc? Please explain.
Honestly, I think you could get it working in cfgrid but it seems like you
are trying to build something that would require more info of scope to hash
out how it would work. This is where I step off this thread...
~|
Order the
I user JQuery treeview for the tree functionality. To recurse through the
directory with a recursive custom tag in the 'tags' directory called recursive:
cfparam name=attributes.currentDir
default=#GetDirectoryFromPath(GetTemplatePath())#
cfdirectory directory=#attributes.currentDir#
I user JQuery treeview for the tree functionality. To recurse through
the directory with a recursive custom tag in the 'tags' directory
cfif not compareNoCase(type,dir) and not name contains _thumbs
cfelseif not name contains _thumbs and not name contains .db and name neq
I have a few Interfaces that have a number of cfc's that implement them. I want
to make sure that whoever is reading the cfc's understand what the methods are
designed to do. I'm a bit confused about when to duplicate hints or if there is
a way to speed this all up.
My steps are as follows:
You should be doing client side validation of type checking with javascript
not ajax calls to the server. It makes sense to make a call to check the
database for duplicates or other non-type-checking validation but for simple
checks I can't imagine trying to build a system that calls the server
I need to create an interface for a set of cfc's so they can implement concrete
behaviors. Does anyone know a workaround for CF8 or have code examples? These
cfc's already extend.
~|
Order the Adobe Coldfusion Anthology now!
script
cfif formIsValid
$(document).ready(function(){showHide()});
cfelse
$(document).ready(function(){showHide(true)});
/cfif
/script
~|
Order the Adobe Coldfusion Anthology now!
cfscript
myFunction(mike, beer,soccer,women );
//either
myFunction(name,likes){
//reference by arguments scope
}
/cfscript
!--or --
cffunction name=myFunction
cfargument name=name
cfargument name=likes
/cffunction
~|
Order
Has anyone used cfhttp to throw an ajax error that returns a JSON object and
error code 500? I'm looking for a code snippet of your onError() method. I'm
using jQuery and am also trying to decide how to handle it on the client side.
Specifically looking for when a session expires and when a
That's exactly what I was looking for Ray. So the $.ajaxSetup() method
handles the errors and redirects expired session. I knew there was a way to
do this outside of my ajax requests but wasn't sure if I needed to create a
proxy method or otherwise. Also, I noticed that you are expecting a string
You're correct if the application was something on the public end but during
black box testing is when this would be useful. Before go-live I would like
the user (or another client based delivery system) to catch errors and pass
them back to a ticket. I can then go into my error log files and see
This is what I got from today's lesson ...
Application.cfc - OnError:
cffunction name=onError access=public
cfargument name=exception required=true
cfargument name=EventName type=String required=true
!---if the request is ajax, throw an error that can be
My post above is wrong. Here is what I wanted to happen:
cffunction name=onError access=public
cfargument name=exception required=true
cfargument name=EventName type=String required=true
!---if the request is ajax, throw an error that can be returned
to the
Larry,
It sounds like your problem is mainly the architecture that you're dealing
with. It is really important to understand modern Ajax (not the old Async
JavaSript XML) and how to finely tune Ajax JavaScript libraries to do what
you want. More specifically how to handle Ajax debugging and
A classic issue yesterday related to isDefined():
This worked perfectly:
cfscript
//pass boolean to determine if the given field is null in the
stored proc (1=submitted, 2=finalized)
if(arguments.status eq 1){
submitted = false;
I started to write the code answer but I'm afraid I didn't have time today.
The short answer is that POI is probably the only option since there aren't
really any other options within Java and your binary conversion method
failed.
To get the process going, I suggest reading your file in as a
cffunction name=getEmailId access=remote returnformat=JSON
cfreturn left(arguments.firstname,1) . arguments.lastname @
lcase(arguments.domain)
Not sure if this fixes it but you might be having a problem with wddx, which
is the default return format.
In your component, create a method that creates an instance of your parent
xmlDoc: this.xmlDoc = xmlNew() when you initialize it.
cffunction name=init
cfset this.xmlDoc = xmlNew()
/cffunction
Then in your NEWJOB function, simply append the data to the this.xmlDoc by
creating a new node.
When
you can add this code to the cffm.js:
function createErrorWin(msg){
var el = $(document.createElement(div));
$(el).html(msg);
$(el).css(zIndex,999);
$(body).append(el);
}
and then do a find and replace for all alerts; find:alert replace:createErrorWin
If an error
This works...
obj= createObject(component,cfc.MyClass);
obj.init(application.id);
obj.executeMethod();
But this does not?
obj= createObject(component,cfc.MyClass).init(application.id);
obj.execute();
on cfc...
cfcomponent
cffunction name=init access=public
cfargument
Of course. I need to return the instance of the object and specify the
object type. Sweet Dave. Thanks.
On Tue, Aug 17, 2010 at 2:05 PM, Dave Watts dwa...@figleaf.com wrote:
This works...
obj= createObject(component,cfc.MyClass);
obj.init(application.id);
obj.executeMethod();
I use a cfc that checks to see if the method being called is from within the
domain, is indeed ajax and that the method is indeed is accessed remotely,
otherwise abort the request. If you are doing cross site requests, pass a
unique key in your form.
Is it ajax?
cffunction name=isAjax
that it can ONLY be used as AJAX, which would prevent other sites from
using
it because of the cross site scripting.
Great idea Tony, thanks!
-Original Message-
From: Tony Bentley [mailto:cascadefreehee...@gmail.com]
Sent: Friday, August 13, 2010 2:55 PM
To: cf-talk
Subject: Re: Preventing
-Original Message-
From: Tony Bentley [mailto:cascadefreehee...@gmail.com]
Sent: Friday, August 13, 2010 3:33 PM
To: cf-talk
Subject: Re: Preventing use of remote method by other sites
Any time!
Keep in mind that anyone can call your method with Ajax so you still need
to
verify the request
Can someone pass me the Perl regex to allow the scripts folder? I'm just not
getting it on my own. So the rule would match anything that contains /CFIDE/
*except /CFIDE/SCRIPTS/ case insensitive.
Thanks in advance for saving me hours and hours of trial and error.
, Tony Bentley
cascadefreehee...@gmail.comwrote:
Can someone pass me the Perl regex to allow the scripts folder? I'm just
not getting it on my own. So the rule would match anything that contains
/CFIDE/ *except /CFIDE/SCRIPTS/ case insensitive.
You can put the /CFIDE/scripts/ folder
Just wanted to follow up in case anyone ever wants to try it.
On your super init method, use this code:
accessRemote = false;
cfcname = getmetadata(this);
for(i=1;i lte arrayLen(cfcname.FUNCTIONS);i++){
fname = cfcname.FUNCTIONS[i];
if(fname.name eq
Is it possible to bind a private or package method to any method with remote
access within a cfc? I want run checks on each request to lock down security
but not on the application level. I want to automate this procedure instead of
having to place the call inside of each method.
I would use
.
Douglas Adams
On Tue, Jul 20, 2010 at 5:07 PM, Tony Bentley wrote:
Is it possible to bind a private or package method to any method with
remote access within a cfc? I want run checks on each request to lock down
security but not on the application level. I want to automate this procedure
I've dealt with this issue time and time again. For instance, you want the
results to be downloaded in an excel document but you don't want to
compromise the time it takes to render just the HTML.
I have an image that is hidden and a spinner saying 'loading excel results'.
Then at page load an
How you are encapsulating your cfc's. It there only one remote object that
interacts with the client and everything else is private/public?
~|
Order the Adobe Coldfusion Anthology now!
See how easy everything is in CF?
Coldfusion is different:
function manageRecipes(){
for(i=1;i lte RecipesQuery.recordcount;i++){
recipes[i].manage();
}
}
I've been writing a lot of JavaScript lately.
Why they decided to start the index at 1 and not allow relational or
Does anyone know a good Recipe Script?
function manageRecipes(){
for(i=0;irecipes.length;i++){
recipes[i].manage();
}
}
You want a recipe module written in ColdFusion?
~|
Order the Adobe Coldfusion
Yes. Include jquery and the following script:
script
//hide debugging on page load
$(document).ready(function(){$('.cfdebug').hide()});
/script
!--place this at the bottom of your pages to toggle show and hide when needed
--
a onclick=$('.cfdebug').show()Show Debugging/a
||
a
I forgot to mention, you can also just add the jquery doc in your CFIDE and
modify your classic debugging page with the included show hide links. That way
it is outside of your project.
~|
Order the Adobe Coldfusion Anthology
Anyone know of a good Word to HTML converter? I need it to strip everything
down to valid HTML without header or body tags.
~|
Order the Adobe Coldfusion Anthology now!
I'm going to try Open Office jodconverter and see if it handles HTML well
enough. Has anyone tried using it ? I found a little code but I'd bet someone
already has a snippet that reads in and outputs whatever arguments you pass. I
noticed it also works with command line...
Michael,
Thanks for releasing the book. I ordered it yesterday. Looking forward to
reading all of the coolness.
-Tony
~|
Order the Adobe Coldfusion Anthology now!
cfqueryparam null=#len(form.field)eq 0# value=#form.field#
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
I need to pass 4 arguments and for this purpose, lets use a,b,c,d
var data = {argumentCollection:{?}};
$.ajax({
url: cfc/mycfc.cfc?method=dbupdate,
dataType: 'json',
data: data,
type: 'post',
success:
If I use serialize I get nothing passed as a post argument. I am requiring all
args and I get the error as normal, ...required but not passed in.
var dat = {
'OBJ': obj,
'VAL': val,
'ATTR': attr,
So then how would I reference an object with members? a.member, a.friend, etc.
I tried a:a and 'a':a but neither works.
I find that it's easier, and more self-documenting, to enumerate the
variables in data directly:
$.ajax({
url: cfc/mycfc.cfc?method=dbupdate,
Okay I figured it out:
var data = {
'a': {a:a.cat,b:a.dog,c:a.etc},
'b': b,
'c': c,
'd': d
};
Thanks everyone for the help. It helped me out quite a bit.
Or better put, a json structure inside of a json structure :-)
arguments.a = DeserializeJSON(arguments.a);
This is then referenced as a ColdFusion structure with members
~|
Want to reach the ColdFusion community with
cfNTauthenticate will pass NT authentication but you will need to have the user
authenticate twice; once when they login to the machine and again per
coldfusion application.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_m-o_07.html
why did I say twice? The user needs to be part of a registered domain and
that's all.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
You could use cfajaxproxy to get your recordset in json and then use jquery
to populate the form fields with the values of each member of the json query
object.
~|
Want to reach the ColdFusion community with something they
I had a similar problem with the xml structure. If I remember correctly, XML is
not actually an array and so I couldn't use arraylen(). I might be wrong but I
tried this once and failed so I decided to bail out and loop through the known
levels of the xml structure.
I'm curious of this as
Your query assumes that there is only one row expected. What happens when you
put the cfset inside of a cfoutput query tag? How many records are there? See
my modified markup below.
cfquery name=Games datasource=hockey
SELECT Team1, Team2, GameDate, GameTime, Location, Comments FROM Games
houseDetails = {address : 1970 ST CHESTER AURORA, 80010, price :
45000,listingNum : 833553, office : 303-487-0777 };
The returned info (price, for example) displays great with ID numbers
in a table as such: td id=price/td or like this p
id=price/p... but how the heck do I use it in a
I think this is related:
http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:61040
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
Looks like you've made progress but the change is happening without any user
notification. You need the fancy web 2.0 ajax icon.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House
ask and you shall be enlightened:
http://www.bennadel.com/blog/726-ColdFusion-Application-cfc-Tutorial-And-Application-cfc-Reference.htm
~|
Want to reach the ColdFusion community with something they want? Let them know
on
Aptana has a synchronization manager which is great if you are coding locally
and push to remote ftp.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
This is over the hundredth comment in this thread. I am using CFEclipse and am
pretty happy over Dreamweaver. It's free and pretty sweet. I'm not going to
complain about Adobe's choice to charge a high price for their new plugin. If
and when it proves to be better than a free plugin, I'll buy
What? You guys have never heard of iMIS before. Talk about overhead. They moved
it onto a .NET platform recently and it was really too much overhead. I've
never used farcry but I know it is the best CFCMS out there.
~|
Want
Well, Sorry the app isn't working for you. If you deploy to a ColdFusion 8 web
server and follow the instructions, it works without any problems. I've never
used Ralio but it looks like this image admin isn't supported.
~|
1 - 100 of 242 matches
Mail list logo