RE: Scope for XMLHttpRequest transmited data

2005-11-13 Thread Bobby Hartsfield
Let's try this again... my last message doesn’t seem to be coming through.

You can POST a form 'object' which will be in the form scope on the cf page
you are posting to.

I usually keep xmlhttprequests pretty simple and hardly ever post forms
since I USUALLY have to write a non-js version for anything I write with JS.


Keeping it simple I usually just use "GET" to send url vars like so...

xmlHttp.open("GET", "mycfpage.cfm?messageSent=" + messageToSend, true);
xmlHttp.send(null);

so on the mycfpage.cfm, there will be a url variable named 'messageSend'
with the value in 'messageToSend'

If you show more code, I might be able to help a little more.

..:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 13, 2005 6:09 PM
To: CF-Talk
Subject: Scope for XMLHttpRequest transmited data

Hi,

I'm trying to implement XMLHttpRequest in an application which send data 
to a CF template using the post method.
The send function is:
xmlhttp.send("messageSent=" + messageToSend)
The CF template is called, but in which scope will it receive the 
messageSent variable?
I've tryied form, url, none, but can't find the content of this variable.

Thanks

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224056
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Scope for XMLHttpRequest transmited data

2005-11-13 Thread Claude Schneegans
Forget it : URL, of course! ;-)

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224055
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Scope for XMLHttpRequest transmited data

2005-11-13 Thread Dave Watts
> I'm trying to implement XMLHttpRequest in an application 
> which send data to a CF template using the post method.
> The send function is:
> xmlhttp.send("messageSent=" + messageToSend)
> The CF template is called, but in which scope will it 
> receive the messageSent variable? I've tryied form, url, 
> none, but can't find the content of this variable.

This depends on what you put into your open method - you have to specify GET
or POST within there, if I recall correctly. If you want to send URL
parameters, just embed them within the URL you specify within open and
specify GET, then call send.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224053
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Scope for XMLHttpRequest transmited data

2005-11-13 Thread Claude Schneegans
 >>It looks like your just trying to send a simple message though? If so 
just
change your method to 'GET' and you'll find it in the URL scope.

For the time being, the text is rather small, but I may have much more 
to pass, including several variables, since I don't expect the session 
variables to be working because of cookies not being passed.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224049
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Scope for XMLHttpRequest transmited data

2005-11-13 Thread Claude Schneegans
 >>xmlhttp.setRequestHeader("Content-Type", 
"application/x-www-form-urlencoded");

Ah ah! I missed this one. Ok, gonna try id.

 >>What's the calling function look like?  Are you using any of the
xmlHttp "Ajax" libraries?

No, because I don't actually need xml, and I can parse messages by 
myself, the only problem is find how to get the text.

Thanks.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224048
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Scope for XMLHttpRequest transmited data

2005-11-13 Thread Marlon Moyer
it should show up in the form scope.  Are you setting the request
header like such:

xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");


What's the calling function look like?  Are you using any of the
xmlHttp "Ajax" libraries?



On 11/13/05, Claude Schneegans <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to implement XMLHttpRequest in an application which send data
> to a CF template using the post method.
> The send function is:
> xmlhttp.send("messageSent=" + messageToSend)
> The CF template is called, but in which scope will it receive the
> messageSent variable?
> I've tryied form, url, none, but can't find the content of this variable.
>
> Thanks
>
> --
> ___
> REUSE CODE! Use custom tags;
> See http://www.contentbox.com/claude/customtags/tagstore.cfm
> (Please send any spam to this address: [EMAIL PROTECTED])
> Thanks.
>
>
> 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224045
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Scope for XMLHttpRequest transmited data

2005-11-13 Thread Bobby Hartsfield
If you are POSTING a form (for lack of a better word) 'object', it'll be in
the form scope.

It looks like your just trying to send a simple message though? If so just
change your method to 'GET' and you'll find it in the URL scope.
 
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 13, 2005 6:09 PM
To: CF-Talk
Subject: Scope for XMLHttpRequest transmited data

Hi,

I'm trying to implement XMLHttpRequest in an application which send data 
to a CF template using the post method.
The send function is:
xmlhttp.send("messageSent=" + messageToSend)
The CF template is called, but in which scope will it receive the 
messageSent variable?
I've tryied form, url, none, but can't find the content of this variable.

Thanks

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.




~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224046
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54