CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 [Resolved] CCGetParam in Functions.js has an error v4.0.0.15

Print topic Send  topic

Author Message
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.
View profile  Send private message
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
View profile  Send private message
rew-NZ

Posts: 21
Posted: 06/03/2008, 12:58 PM

Hi Walter,
{added link to original post}

Rew
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.