AJAX Question

2010-05-20 Thread fun and learning

Looks like the AJAX forums is not active, so I thought I will post my question 
here. 

What is the difference between onload and onreadystatechange event in AJAX? Can 
either of the function be used to check if the XMLHTTPRequest state has been 
changed? 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333827
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


AJAX Question

2010-01-22 Thread Matthew Allen

Can anyone please give me pointers or real life example of how to insert simple 
form field values into a database using AJAX.

Many thanks.

Matt 

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


Re: AJAX Question

2010-01-22 Thread Mike Chabot

The way you do that depends on which Ajax library you are using. You
insert data into the database the way you normally do using
ColdFusion. The JavaScript that you use pulls data from the form
fields, sends it to the server using any number of methods, then
ColdFusion takes it from there and send back a response to the browser
when it is done.

Which JavaScript framework were you going to use, if any? Which
version of CF are you using? Have you tried searching for examples on
the Web yet?

-Mike Chabot

On Fri, Jan 22, 2010 at 9:48 AM, Matthew Allen a.matthe...@yahoo.com wrote:

 Can anyone please give me pointers or real life example of how to insert 
 simple form field values into a database using AJAX.

 Many thanks.

 Matt

 

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


RE: AJAX Question

2010-01-22 Thread Andy Matthews

Bear in mind that you do not insert values into a database with AJAX. AJAX
is merely  way to pass said values to the processing page of your choice
without page refresh.

So assuming you know how to do a database insert with ColdFusion, you'd just
need to know how to pass the values from your client code to your ColdFusion
page.

jQuery makes this very simple:

$.get(http://www.yoursite.com/path/to/coldfusion/file.cfm;, {
// here's the key value pairs you want to pass in your request
key1: 'value one',
key2: 'value two',
key3: 'value three'
},function(data){
// if your processing page will be passing data BACK to your client
page
// then you'd do something with that data here.
}); 

-Original Message-
From: Matthew Allen [mailto:a.matthe...@yahoo.com] 
Sent: Friday, January 22, 2010 8:48 AM
To: cf-talk
Subject: AJAX Question


Can anyone please give me pointers or real life example of how to insert
simple form field values into a database using AJAX.

Many thanks.

Matt 



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


RE: AJAX Question

2010-01-22 Thread Andy Matthews

One thing I forgot to mention. If you use the below method, then you'd
reference the values on the ColdFusion page in the URL scope.

URL.key1
URL.key2
Etc.

If you need a POST then you'd just change the var references to the FORM
scope, and change $.get to $.post


andy

-Original Message-
From: Andy Matthews [mailto:li...@commadelimited.com] 
Sent: Friday, January 22, 2010 9:15 AM
To: cf-talk
Subject: RE: AJAX Question


Bear in mind that you do not insert values into a database with AJAX. AJAX
is merely  way to pass said values to the processing page of your choice
without page refresh.

So assuming you know how to do a database insert with ColdFusion, you'd just
need to know how to pass the values from your client code to your ColdFusion
page.

jQuery makes this very simple:

$.get(http://www.yoursite.com/path/to/coldfusion/file.cfm;, {
// here's the key value pairs you want to pass in your request
key1: 'value one',
key2: 'value two',
key3: 'value three'
},function(data){
// if your processing page will be passing data BACK to your client
page
// then you'd do something with that data here.
}); 

-Original Message-
From: Matthew Allen [mailto:a.matthe...@yahoo.com]
Sent: Friday, January 22, 2010 8:48 AM
To: cf-talk
Subject: AJAX Question


Can anyone please give me pointers or real life example of how to insert
simple form field values into a database using AJAX.

Many thanks.

Matt 





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


Re: AJAX Question

2010-01-22 Thread Tom Chiverton

On Friday 22 Jan 2010, Matthew Allen wrote:
 Can anyone please give me pointers or real life example of how to insert
 simple form field values into a database using AJAX.

/your/path/to/A.cfc?returnFormat=jsonmethod='yourSaveMethodName'arg1='foo'arg2=23

-- 
Helping to evangelistically introduce web-enabled killer dynamic scalable 
applications as part of the IT team of the year 2010, '09 and '08



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
“partner” to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.co

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


RE: AJAX Question

2010-01-22 Thread Scott Stewart

Matt here's a quick one using JQuery:

First off, you need to load the JQuery libraries in the head of the page.

script type=text/javascript
$(document).ready(function() {
$(#button name).live(click, function(){
$.ajax({
type:post,
url:url of processing page,
data:$(#form name).serialize(),
cache:false,
success:
function(){$(#receiving div).load(page to load on sucess)},
error: function(){
error functionality here;
}
});
});
)}
/script

From the top, 

$(document).ready(function() {

This ensures that everything inside is as soon as the DOM is loaded, while
not as important here, if you're using JQuery for layout manipulation it's
critical, so make a habit of wrapping all JQuery code in it.

$(#button name).live(click, function(){

This script is triggered off of a button, make sure the button tag has an
id, this is what you'll trigger on. 

url:url of processing page,

this is url of whatever actions you're going to call, hijacks the action
attribute of the form tag

success: function(){$(#receiving div).load(page to load on sucess)},

The page that you want to load after processing, and the div that it should
be placed in

error: function(){error functionality here;}

error functionality, error pages etc.

This is quick and dirty, there's an entire form plugin for JQuery that may
be better suited to what you need.

To debug any AJAX stuff, if you haven't already downloaded Firefox, do it
and get the firebug plugin, along with the JQuery plugins that are
available. The NET tab in firebug will show you all of the behind the scenes
stuff going on.

Hope this helps

sas


-Original Message-
From: Matthew Allen [mailto:a.matthe...@yahoo.com] 
Sent: Friday, January 22, 2010 9:48 AM
To: cf-talk
Subject: AJAX Question


Can anyone please give me pointers or real life example of how to insert
simple form field values into a database using AJAX.

Many thanks.

Matt 



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


RE: AJAX Question

2010-01-22 Thread Chris Dicamillo

Also, if you're using CF9's AJAX implementation, putting ?cfdebug at the end
of your URL will show the AJAX debugger (assuming that feature is enabled in
the CF Admin).

Chris

 -Original Message-
 From: Scott Stewart [mailto:sstwebwo...@bellsouth.net]
 Sent: Friday, January 22, 2010 8:21 AM
 To: cf-talk
 Subject: RE: AJAX Question
 
 
 Matt here's a quick one using JQuery:
 
 First off, you need to load the JQuery libraries in the head of the
 page.
 
 script type=text/javascript
   $(document).ready(function() {
   $(#button name).live(click, function(){
   $.ajax({
   type:post,
   url:url of processing page,
   data:$(#form name).serialize(),
   cache:false,
   success:
 function(){$(#receiving div).load(page to load on sucess)},
   error: function(){
   error functionality here;
   }
   });
   });
   )}
 /script
 
 From the top,
 
 $(document).ready(function() {
 
 This ensures that everything inside is as soon as the DOM is loaded,
 while
 not as important here, if you're using JQuery for layout manipulation
 it's
 critical, so make a habit of wrapping all JQuery code in it.
 
 $(#button name).live(click, function(){
 
 This script is triggered off of a button, make sure the button tag has
 an
 id, this is what you'll trigger on.
 
 url:url of processing page,
 
 this is url of whatever actions you're going to call, hijacks the
 action
 attribute of the form tag
 
 success: function(){$(#receiving div).load(page to load on
 sucess)},
 
 The page that you want to load after processing, and the div that it
 should
 be placed in
 
 error: function(){error functionality here;}
 
 error functionality, error pages etc.
 
 This is quick and dirty, there's an entire form plugin for JQuery that
 may
 be better suited to what you need.
 
 To debug any AJAX stuff, if you haven't already downloaded Firefox, do
 it
 and get the firebug plugin, along with the JQuery plugins that are
 available. The NET tab in firebug will show you all of the behind the
 scenes
 stuff going on.
 
 Hope this helps
 
 sas
 
 
 -Original Message-
 From: Matthew Allen [mailto:a.matthe...@yahoo.com]
 Sent: Friday, January 22, 2010 9:48 AM
 To: cf-talk
 Subject: AJAX Question
 
 
 Can anyone please give me pointers or real life example of how to
 insert
 simple form field values into a database using AJAX.
 
 Many thanks.
 
 Matt
 
 
 
 

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


RE: AJAX Question

2010-01-22 Thread Scott Stewart

Chris, 

I'm not sure how well the debugger works with non cf ajax.. I've just stuck
with firebug.

-Original Message-
From: Chris Dicamillo [mailto:ch...@warnercnr.colostate.edu] 
Sent: Friday, January 22, 2010 10:38 AM
To: cf-talk
Subject: RE: AJAX Question


Also, if you're using CF9's AJAX implementation, putting ?cfdebug at the end
of your URL will show the AJAX debugger (assuming that feature is enabled in
the CF Admin).

Chris

 -Original Message-
 From: Scott Stewart [mailto:sstwebwo...@bellsouth.net]
 Sent: Friday, January 22, 2010 8:21 AM
 To: cf-talk
 Subject: RE: AJAX Question
 
 
 Matt here's a quick one using JQuery:
 
 First off, you need to load the JQuery libraries in the head of the
 page.
 
 script type=text/javascript
   $(document).ready(function() {
   $(#button name).live(click, function(){
   $.ajax({
   type:post,
   url:url of processing page,
   data:$(#form name).serialize(),
   cache:false,
   success:
 function(){$(#receiving div).load(page to load on sucess)},
   error: function(){
   error functionality here;
   }
   });
   });
   )}
 /script
 
 From the top,
 
 $(document).ready(function() {
 
 This ensures that everything inside is as soon as the DOM is loaded,
 while
 not as important here, if you're using JQuery for layout manipulation
 it's
 critical, so make a habit of wrapping all JQuery code in it.
 
 $(#button name).live(click, function(){
 
 This script is triggered off of a button, make sure the button tag has
 an
 id, this is what you'll trigger on.
 
 url:url of processing page,
 
 this is url of whatever actions you're going to call, hijacks the
 action
 attribute of the form tag
 
 success: function(){$(#receiving div).load(page to load on
 sucess)},
 
 The page that you want to load after processing, and the div that it
 should
 be placed in
 
 error: function(){error functionality here;}
 
 error functionality, error pages etc.
 
 This is quick and dirty, there's an entire form plugin for JQuery that
 may
 be better suited to what you need.
 
 To debug any AJAX stuff, if you haven't already downloaded Firefox, do
 it
 and get the firebug plugin, along with the JQuery plugins that are
 available. The NET tab in firebug will show you all of the behind the
 scenes
 stuff going on.
 
 Hope this helps
 
 sas
 
 
 -Original Message-
 From: Matthew Allen [mailto:a.matthe...@yahoo.com]
 Sent: Friday, January 22, 2010 9:48 AM
 To: cf-talk
 Subject: AJAX Question
 
 
 Can anyone please give me pointers or real life example of how to
 insert
 simple form field values into a database using AJAX.
 
 Many thanks.
 
 Matt
 
 
 
 



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


RE: AJAX Question

2010-01-22 Thread Chris Dicamillo

You're probably right. Your note about using firebug reminded me of the
built in debugger with CF9, so I figured it would be worth letting Matthew
know about it if he was using cfajaxproxy.

Chris

 -Original Message-
 From: Scott Stewart [mailto:sstwebwo...@bellsouth.net]
 Sent: Friday, January 22, 2010 8:50 AM
 To: cf-talk
 Subject: RE: AJAX Question
 
 
 Chris,
 
 I'm not sure how well the debugger works with non cf ajax.. I've just
 stuck
 with firebug.
 
 -Original Message-
 From: Chris Dicamillo [mailto:ch...@warnercnr.colostate.edu]
 Sent: Friday, January 22, 2010 10:38 AM
 To: cf-talk
 Subject: RE: AJAX Question
 
 
 Also, if you're using CF9's AJAX implementation, putting ?cfdebug at
 the end
 of your URL will show the AJAX debugger (assuming that feature is
 enabled in
 the CF Admin).
 
 Chris
 
  -Original Message-
  From: Scott Stewart [mailto:sstwebwo...@bellsouth.net]
  Sent: Friday, January 22, 2010 8:21 AM
  To: cf-talk
  Subject: RE: AJAX Question



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


Re: AJAX Question

2010-01-22 Thread Matthew Allen

Thanks all, I really appreciate all the input.

Now to go away and start working.

Matt. 

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


RE: AJAX Question

2010-01-22 Thread brad

I appreciate everyone falling over themselves to give the obligatory
Use jQuery response :), but I'm kind of surprised no one mentioned the
super simple method of doing this that is built right in to CF8 and 9.

Click on this link (CF8 docs):
http://livedocs.adobe.com/coldfusion/8/htmldocs/ajaxui_5.html
and scroll down to Using the cfajaxproxy SetForm function.

There's a working code sample for you and everything.  Essentially, you
create a CFC on the server side and reference it with a cfajaxproxy tag.
 To borrow from Adobe's example, the magic happens in about 3 lines of
JavaScript code:

var auth = new AuthenticationSystem();
auth.setForm(loginForm);
auth.validateCredentials();

~Brad


 Original Message 
Subject: AJAX Question
From: Matthew Allen a.matthe...@yahoo.com
Date: Fri, January 22, 2010 8:48 am
To: cf-talk cf-talk@houseoffusion.com


Can anyone please give me pointers or real life example of how to insert
simple form field values into a database using AJAX.

Many thanks.

Matt 



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


RE: AJAX Question

2010-01-22 Thread Andy Matthews

It's mostly because I don't know of anyone actually using CF8's built in
implementation. It's highly unlikely that anyone is going to be building a
single AJAX call in a vacuum. Most developers are going to be using jQuery
for other aspects of the site's development. Better to stay consistent and
use jQuery for everything rather than drop into a different implementation
and syntax.


andy

-Original Message-
From: b...@bradwood.com [mailto:b...@bradwood.com] 
Sent: Friday, January 22, 2010 12:06 PM
To: cf-talk
Subject: RE: AJAX Question


I appreciate everyone falling over themselves to give the obligatory Use
jQuery response :), but I'm kind of surprised no one mentioned the super
simple method of doing this that is built right in to CF8 and 9.

Click on this link (CF8 docs):
http://livedocs.adobe.com/coldfusion/8/htmldocs/ajaxui_5.html
and scroll down to Using the cfajaxproxy SetForm function.

There's a working code sample for you and everything.  Essentially, you
create a CFC on the server side and reference it with a cfajaxproxy tag.
 To borrow from Adobe's example, the magic happens in about 3 lines of
JavaScript code:

var auth = new AuthenticationSystem();
auth.setForm(loginForm);
auth.validateCredentials();

~Brad


 Original Message 
Subject: AJAX Question
From: Matthew Allen a.matthe...@yahoo.com
Date: Fri, January 22, 2010 8:48 am
To: cf-talk cf-talk@houseoffusion.com


Can anyone please give me pointers or real life example of how to insert
simple form field values into a database using AJAX.

Many thanks.

Matt 





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


RE: AJAX Question

2010-01-22 Thread brad

 Better to stay consistent and use jQuery for everything rather than drop into 
 a different implementation and syntax.

From the sound of his question I'd bet he's not using any Ajax
implementation and syntax right now.

 I don't know of anyone actually using CF8's built in implementation

That's too bad.  We use it, and we use it everywhere we do Ajax.  We
still use jQuery for pretty much all our other DOM manipulation and
stuff but we simply can't beat the ajax proxy stuff when it comes to
talking back to the server.  It's simple, it does everything we need
(like easy error-handling), and it works well.

 It's highly unlikely that anyone is going to be building a single AJAX call 
 in a vacuum.

I would agree, but the usage of any other JS framework (like jQuery)
doesn't automatically preclude the possibility of me mixing and matching
the best and easiest of all worlds.  The OP is obviously getting his
feet wet in Ajax right now.  I'm sure he'll drink the jQuery koolaid
like most of us in due time. In the mean time, he deserves to at least
know the viable options that he already purchased along with his CF
license.  :)

~Brad


 Original Message 
Subject: RE: AJAX Question
From: Andy Matthews li...@commadelimited.com
Date: Fri, January 22, 2010 12:13 pm
To: cf-talk cf-talk@houseoffusion.com


It's mostly because I don't know of anyone actually using CF8's built in
implementation. It's highly unlikely that anyone is going to be building
a
single AJAX call in a vacuum. Most developers are going to be using
jQuery
for other aspects of the site's development. Better to stay consistent
and
use jQuery for everything rather than drop into a different
implementation
and syntax.



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


Re: Newb AJAX question

2008-08-07 Thread Bret McDermitt
Thanks Tom, my JS is really weak... can you point me to some resources online 
that would walk me through this?

Bret

 On Tuesday 29 Jul 2008, Bret McDermitt wrote:
  right on the money. If I could generate that key based on the domain 
 name
  being passed to my server using AJAX and then send that to the 
 iframe src,
  that'd be perfect.
 
 Have the JavaScript on the host request a token from your server, 
 combine it 
 with their IP/domain name, and send it along with the IFRAME URL ?
 
 -- 
 Tom Chiverton
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in 
 England and Wales under registered number OC307980 whose registered 
 office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, 
 Manchester, M3 3EB.  A list of members is available for inspection at 
 the registered office. Any reference to a partner in relation to 
 Halliwells LLP means a member of Halliwells LLP.  Regulated by The 
 Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above 
 and may be confidential or legally privileged.  If you are not the 
 addressee you must not read it and must not use any information 
 contained in nor copy it nor inform any person other than Halliwells 
 LLP or the addressee of its existence or contents.  If you have 
 received this email in error please delete it and notify Halliwells 
 LLP IT Department on 0870 365 2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310348
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Newb AJAX question

2008-08-07 Thread Tom Chiverton
On Thursday 07 Aug 2008, Bret McDermitt wrote:
 Thanks Tom, my JS is really weak... can you point me to some resources
 online that would walk me through this?

Probably not, sorry, I don't really use JavaScript for this sort of thing 
anymore, and don't know the details of your server or AJAX library.

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310379
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


cfgrid with Ajax question...

2008-08-02 Thread Tom Jones
Hello,
I have just started to play with Coldfusion 8 and I really like the  
Ajax integration. I have been following some the guide info on how to  
use it and I have a question. I have the following code here that  
allows me to edit in place, which is really cool, but I would like to  
have the first column be a link to the full client record and also not  
editable.

Is it possible to make the first column a link and non-editable?

thanks,
tom


cfform name=form02
 cfgrid format=html name=grid02 pagesize=10 sort=true  
bind=cfc:places.getClients({cfgridpage},{cfgridpagesize},
 {cfgridsortcolumn},{cfgridsortdirection})
delete=yes selectmode=edit
 onchange=cfc:places.editData({cfgridaction},{cfgridrow}, 
{cfgridchanged})  

 cfgridcolumn name=rid display=true header=id href=/ 
client.cfm/
 cfgridcolumn name=FirstName1 display=true header=First  
Name1/
 cfgridcolumn name=LastName1 display=true header=Last  
Name1 /
 /cfgrid
/cfform

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310100
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: cfgrid with Ajax question...

2008-08-02 Thread Tom Jones
Nevermind, I just figured it out, by adding (select=no) to the  
cfgridcolumn that did the trick.

tom

On Aug 2, 2008, at 5:21 PM, Tom Jones wrote:

 Hello,
 I have just started to play with Coldfusion 8 and I really like the
 Ajax integration. I have been following some the guide info on how to
 use it and I have a question. I have the following code here that
 allows me to edit in place, which is really cool, but I would like to
 have the first column be a link to the full client record and also not
 editable.

 Is it possible to make the first column a link and non-editable?

 thanks,
 tom


 cfform name=form02
 cfgrid format=html name=grid02 pagesize=10 sort=true
 bind=cfc:places.getClients({cfgridpage},{cfgridpagesize},
 {cfgridsortcolumn},{cfgridsortdirection})
   delete=yes selectmode=edit
 onchange=cfc:places.editData({cfgridaction},{cfgridrow},
 {cfgridchanged})  
   
 cfgridcolumn name=rid display=true header=id href=/
 client.cfm/
 cfgridcolumn name=FirstName1 display=true header=First
 Name1/
 cfgridcolumn name=LastName1 display=true header=Last
 Name1 /
 /cfgrid
 /cfform

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310101
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Newb AJAX question

2008-07-30 Thread Tom Chiverton
On Tuesday 29 Jul 2008, Bret McDermitt wrote:
 right on the money. If I could generate that key based on the domain name
 being passed to my server using AJAX and then send that to the iframe src,
 that'd be perfect.

Have the JavaScript on the host request a token from your server, combine it 
with their IP/domain name, and send it along with the IFRAME URL ?

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309917
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Newb AJAX question

2008-07-29 Thread Bret McDermitt
Any other ideas?

 On Monday 28 Jul 2008, Bret McDermitt wrote:
  I have a framed app and I'm trying to authenticate it's use by 
 domain. So
  if someone in domain a.com wants to use it, I would like to be able 
 to
  check and see if that domain is authorized. Norton killed my odds of 
 going
  the CGI route,
 
 Tell me you weren't relying on CGI.REFERER ...
 
 -- 
 Tom Chiverton
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in 
 England and Wales under registered number OC307980 whose registered 
 office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, 
 Manchester, M3 3EB.  A list of members is available for inspection at 
 the registered office. Any reference to a partner in relation to 
 Halliwells LLP means a member of Halliwells LLP.  Regulated by The 
 Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above 
 and may be confidential or legally privileged.  If you are not the 
 addressee you must not read it and must not use any information 
 contained in nor copy it nor inform any person other than Halliwells 
 LLP or the addressee of its existence or contents.  If you have 
 received this email in error please delete it and notify Halliwells 
 LLP IT Department on 0870 365 2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309859
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Newb AJAX question

2008-07-29 Thread Tom Chiverton
On Tuesday 29 Jul 2008, Bret McDermitt wrote:
 Any other ideas?

Well, generally, you wouldn't use something totally under the control of an 
attacker...
You could require the framing site passes a token into you application for 
instance, and make sure no 2 IP address' use the same token.

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309862
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Newb AJAX question

2008-07-29 Thread Bret McDermitt
I don't think that would work if two or more clients are on a shared host, 
which several are. That's the general concept though, so you're pretty much 
right on the money. If I could generate that key based on the domain name being 
passed to my server using AJAX and then send that to the iframe src, that'd be 
perfect.


 On Tuesday 29 Jul 2008, Bret McDermitt wrote:
  Any other ideas?
 
 Well, generally, you wouldn't use something totally under the control 
 of an 
 attacker...
 You could require the framing site passes a token into you application 
 for 
 instance, and make sure no 2 IP address' use the same token.
 
 -- 
 Tom Chiverton
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in 
 England and Wales under registered number OC307980 whose registered 
 office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, 
 Manchester, M3 3EB.  A list of members is available for inspection at 
 the registered office. Any reference to a partner in relation to 
 Halliwells LLP means a member of Halliwells LLP.  Regulated by The 
 Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above 
 and may be confidential or legally privileged.  If you are not the 
 addressee you must not read it and must not use any information 
 contained in nor copy it nor inform any person other than Halliwells 
 LLP or the addressee of its existence or contents.  If you have 
 received this email in error please delete it and notify Halliwells 
 LLP IT Department on 0870 365 2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309881
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Newb AJAX question

2008-07-29 Thread Bret McDermitt
Yikes... no more frames? What are developers using to include content from one 
site to another?

Well...

As I see it, if something Norton cooked up is preventing you from seeing 
what domain the user is going to, then the easiest thing is to remove 
Norton from the users computer (and I'm always in support of removing 
that spyware).

I suppose that you can use a onload to write a value (the page location) 
to the DB and then cause the page to redirect to that specific page 
within the iframe (which you shouldn't use anyway since frames are going 
out with HTML 5.0).

No AJAX required.

Bret McDermitt wrote:
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309882
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Newb AJAX question

2008-07-29 Thread Phillip M. Vector
I misspoke. Apparently, iframe is still supported. Not frames though.

http://blog.wired.com/monkeybites/2008/01/the-html-5-draf.html

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309884
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Newb AJAX question

2008-07-28 Thread Bret McDermitt
Thanks for the feedback. So this seems more like a work-around instead of a 
fix, there's no way you can think of to get this done using a JS include and 
ajax? Appreciate it.
Bret

 Why not check for the CGI variable and if it doesn't exist (or if it's 
 
 blank, I'm not sure what it looks like), then put up a message saying 
 to 
 please turn it back on (with directions on how).
 
 That bypasses any issue you may have. Granted, it may upset a few 
 people, but honestly, they shouldn't be using nortons anyway.
 
 Bret McDermitt wrote:
  I have a framed app and I'm trying to authenticate it's use by 
 domain. So if someone in domain a.com wants to use it, I would like to 
 be able to check and see if that domain is authorized. Norton killed 
 my odds of going the CGI route, now I'm wondering if I can give the 
 clients a JS script include which would post their 'document.location' 
 to my server and I could send back the key to populate the iframe with 
 an authenticated app URL?
  
  Easier said than done? I've been mulling this over a while and I 
 can't seem to get it right from an architecture standpoint. Any 
 thoughts?
  
  Thanks, Bret 
  
  


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309796
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Newb AJAX question

2008-07-28 Thread Tom Chiverton
On Monday 28 Jul 2008, Bret McDermitt wrote:
 I have a framed app and I'm trying to authenticate it's use by domain. So
 if someone in domain a.com wants to use it, I would like to be able to
 check and see if that domain is authorized. Norton killed my odds of going
 the CGI route,

Tell me you weren't relying on CGI.REFERER ...

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309797
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Newb AJAX question

2008-07-28 Thread Phillip M. Vector
Well...

As I see it, if something Norton cooked up is preventing you from seeing 
what domain the user is going to, then the easiest thing is to remove 
Norton from the users computer (and I'm always in support of removing 
that spyware).

I suppose that you can use a onload to write a value (the page location) 
to the DB and then cause the page to redirect to that specific page 
within the iframe (which you shouldn't use anyway since frames are going 
out with HTML 5.0).

No AJAX required.

Bret McDermitt wrote:
 Thanks for the feedback. So this seems more like a work-around instead of a 
 fix, there's no way you can think of to get this done using a JS include and 
 ajax? Appreciate it.
 Bret
 
 Why not check for the CGI variable and if it doesn't exist (or if it's 

 blank, I'm not sure what it looks like), then put up a message saying 
 to 
 please turn it back on (with directions on how).

 That bypasses any issue you may have. Granted, it may upset a few 
 people, but honestly, they shouldn't be using nortons anyway.

 Bret McDermitt wrote:
 I have a framed app and I'm trying to authenticate it's use by 
 domain. So if someone in domain a.com wants to use it, I would like to 
 be able to check and see if that domain is authorized. Norton killed 
 my odds of going the CGI route, now I'm wondering if I can give the 
 clients a JS script include which would post their 'document.location' 
 to my server and I could send back the key to populate the iframe with 
 an authenticated app URL?
 Easier said than done? I've been mulling this over a while and I 
 can't seem to get it right from an architecture standpoint. Any 
 thoughts?
 Thanks, Bret 


 
 
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309798
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Newb AJAX question

2008-07-27 Thread Bret McDermitt
I have a framed app and I'm trying to authenticate it's use by domain. So if 
someone in domain a.com wants to use it, I would like to be able to check and 
see if that domain is authorized. Norton killed my odds of going the CGI route, 
now I'm wondering if I can give the clients a JS script include which would 
post their 'document.location' to my server and I could send back the key to 
populate the iframe with an authenticated app URL?

Easier said than done? I've been mulling this over a while and I can't seem to 
get it right from an architecture standpoint. Any thoughts?

Thanks, Bret 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309776
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Newb AJAX question

2008-07-27 Thread Phillip M. Vector
Why not check for the CGI variable and if it doesn't exist (or if it's 
blank, I'm not sure what it looks like), then put up a message saying to 
please turn it back on (with directions on how).

That bypasses any issue you may have. Granted, it may upset a few 
people, but honestly, they shouldn't be using nortons anyway.

Bret McDermitt wrote:
 I have a framed app and I'm trying to authenticate it's use by domain. So if 
 someone in domain a.com wants to use it, I would like to be able to check and 
 see if that domain is authorized. Norton killed my odds of going the CGI 
 route, now I'm wondering if I can give the clients a JS script include which 
 would post their 'document.location' to my server and I could send back the 
 key to populate the iframe with an authenticated app URL?
 
 Easier said than done? I've been mulling this over a while and I can't seem 
 to get it right from an architecture standpoint. Any thoughts?
 
 Thanks, Bret 
 
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309779
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


AJAX Question

2007-06-08 Thread Phillip M. Vector
Pretty simple.. But I can't see it..

form
Message: input type=text id=Message onkeyup=showmessages() 
onenter=entermessage() size=40
input type=Hidden id=Room value=1
/form

function entermessage()
{
xmlHttp=GetXmlHttpObject()
var url=#self#Chat.EnterMessage;
url=url+room=+document.getElementById(Room).value;
url=url+message=+document.getElementById(Message).value;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open(GET,url,true);
xmlHttp.send(null);
}

cfquery datasource=#datasource#
Insert into Chat_Messages
(Message, Room)
VALUES
('#url.Message#', #url.Room#)
/cfquery


Anyone know why this wouldn't work? It keeps not being able to go to the 
proper fusebox circuit.


#self# is defined as index.cfm?fuseaction=

But it's getting sent to index.cfm?

*scratches his head*

~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280534
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4