rew-NZ
Posts: 21
|
| Posted: 06/03/2008, 6:04 AM |
|
Hi All,
Found a bug in the CCGetParam() function used for getting a URL variable value in Javascript which fails to match the key name against the param given to the function. The fix is adding in a .toLowerCase() in the comparison.
Here is the fix from YesSoftware if you need it:
function CCGetParam(strParamName) {
var strReturn = "";
var strHref = window.location.href;
if ( strHref.indexOf("?") > -1 ) {
var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
var aQueryString = strQueryString.split("&");
for ( var iParam = 0; iParam < aQueryString.length; iParam++ ) {
if (aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ) {
var aParam = aQueryString[iParam].split("=");
strReturn = aParam[1];
break;
}
}
}
return strReturn;
}
Here is a link to the file they sent me to fix the resource file in CodeCharge:
http://www.anyzoom.com/files/Functions.js.zip
Just extract it into the CodeCharge folder as it has the directory path required to replace the file. Restart CodeCharge and republish all relevant projects that use it.
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 06/03/2008, 6:51 AM |
|
Useful, thanks for posting.
Is this construct anywhere in the generated base files?
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
rew-NZ
Posts: 21
|
| Posted: 06/03/2008, 12:58 PM |
|
Hi Walter,
{added link to original post}
Rew
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 06/03/2008, 5:29 PM |
|
Thanks,
Also add CCS version to the end of your topic, so we can relate to it in the future.
Meaning if version 4.5 is out we know this one is passed, lol
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
|