>> I got plenty of egg left over from my face it you want some:P
 
thanx, Steve, but I've usually got enough to put SunnyQueen out of production...
 
and here was I thinking all that _vbscript_ skill was redundant - pity you can't delete useless memory like Johnny Mnemonic
 
Carl, I've got tons of ASP apps you could have a go at converting by yourself to brush up your translation skills...ah, but I see you have your own to do - Have fun!
 
cheers
barry.b
 
 
 
-----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 asp

Dam Barry
 
 
Dont 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...:P
 
 
 
I'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!
 
Regards
Steve 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 asp

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