--------Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Steve Onnis
Sent: Wednesday, 29 June 2005 4:24 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: convert from aspDam BarryDont forget the ";" at the line inside the IF. CF will error if its not t here. Not to mention the opening "{" for the function that we both missed...:PI'll give it another go<cfscript>function hash_to_string(CC) {var CC_string = "";var i = 1;for (i=1; i LTE 5; i = i + 1) {if ( CC[i][1] NEQ "") {CC_string = listAppend(CC_string, "#CC[i][1]#=#URLEncodedFormat(CC[i][2])#", "&");}}return CC_string;}</cfscript>I have used listAppend() in mine here. I find it makes it a little easier to read.But hey.......what do you want for free hey!RegardsSteve Onnis--------Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Barry Beattie
Sent: Wednesday, June 29, 2005 4:04 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: convert from aspArgh! steve. I made a mistake and you got it right ( the CC[i][0] part - I forgot to convert this)but hang on - that's saying that the array is zero based which in CF isn't true it's based on 1so<cfscript>function hash_to_string(CC)var CC_string = "";
for (i = 1;i LTE 6; i=i+1){
if (CC[i][2] GT ""){
CC_string = CC_string & CC[i][1] & "=" & URLEncodedFormat( CC[i][2] ) & "&"
}
return(CC_string);
}
</cfscript>--------Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Steve Onnis
Sent: Wednesday, 29 June 2005 4:01 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: convert from aspResponse.Redirect is just like CFLOCATIONHTTP_PROTOCOL is either HTTP or HTTP (CGI.HTTP_PROTOCOL)AT_SERVER is just a variable from somewhereWEBSITE_ID is just a variable from somewhereVERSION is just a variable from somewhereServer.URLEncode is URLEncodedFormat()I think CC is an 2 dimensional arrayThis looks like it just creates a query stringfunction hash_to_string(CC)
var CC_string = "";
var i = 0;for (i=0; i LTE 5; i = i + 1) {
if ( CC[i][1] NEQ "") {
CC_string = CC_string & CC[i][0] & "=" & URLEncodedFormat(CC[i][1] ) & "&";
}
}
return CC_string;
}
Hope it helps
Regards
Steve Onnis
--------Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Carl Vanderpal
Sent: Wednesday, June 29, 2005 3:42 PM
To: CFAussie Mailing List
Subject: [cfaussie] convert from aspHello CFAussie,
Just need to get the Cold Fusion equivalents for these ASP calls please:
Response.Redirect (example below):
Response.Redirect( HTTP_PROTOCOL & "://" & AT_SERVER & "/" & WEBSITE_ID & "/track/visit/?CC_" & VERSION & "=" & Server.URLEncode(CC))
and
hash_to_string (example below)
function hash_to_string(CC)
dim CC_string
for i = 0 to 5
if (CC(i,1) > "") then
CC_string = CC_string & CC(i,0) & "=" & Server.URLEncode( CC(i,1) ) & "&"
end if
next
hash_to_string = CC_string
end function
Thanks
Best Regards,
Carl Vanderpal
====================================
Postal: Po Box 3462 Dural, NSW 2158
Email: mailto:[EMAIL PROTECTED]
FireFly Internet Phone: 80011777
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
