Argh! 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 1
 
so
 
<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 asp

Response.Redirect is just like CFLOCATION
HTTP_PROTOCOL is either HTTP or HTTP (CGI.HTTP_PROTOCOL)
AT_SERVER is just a variable from somewhere
WEBSITE_ID is just a variable from somewhere
VERSION is just a variable from somewhere
Server.URLEncode is URLEncodedFormat()
 
 
I think CC is an 2 dimensional array
 
This looks like it just creates a query string
 

function 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 asp

Hello 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/

Reply via email to