CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 warnings autofill

Print topic Send  topic

Author Message
x-ray

Posts: 18
Posted: 05/04/2012, 5:20 AM

When I use autofill and generate the code (publish) I always get a warning:

Generating "CLSsales\sales_order_entry"
Warning:An unclosed string constant. Ln: 378, Col: 167.

The program works perfect.
Does anyone have the same experience?
Should I be worried about this warning?

The lines where the warning occurs are:

new Ajax.Request("../services/CLSsales_sales_order_entry_EntryBlock_order_order_l1_product_id_PTAutoFill1.php?keyword=" + encodeURIComponent(sender.value).replace(/'/g, "%27"), {
method: "get",

_________________
I may disapprove of what you say, but I will defend to the death your right to say it
View profile  Send private message
clahti2

Posts: 107
Posted: 05/24/2012, 10:50 AM

can you post the entire block of code from the file for the following lines

Ln: 370 - Ln: 380

I will have a look
View profile  Send private message
x-ray

Posts: 18
Posted: 05/24/2012, 12:50 PM

Meanwhile my code changed.
Current message = Warning:An unclosed string constant. Ln: 362, Col: 167.

I am in contact with YesSoftware.
They are looking into this....

line 359: //PTAutoFill3 Loading @278-8D27C235
function EntryBlock_orderorder_l2_stock_idPTAutoFill3_start(sender) {
if (!sender) return;
new Ajax.Request("../services/CLSsales_sales_order_entry_EntryBlock_order_order_l2_stock_id_PTAutoFill1.php?keyword=" + encodeURIComponent(sender.value).replace(/'/g, "%27"), {
method: "get",
requestHeaders: ['If-Modified-Since', new Date(0)],
onSuccess: function(transport) {
var valuesRow = eval(transport.responseText)[0];
if (typeof(valuesRow) != "undefined") {
getSameLevelCtl("EntryBlock_orderl2_currency", sender).value = valuesRow["currency_code"];
getSameLevelCtl("EntryBlock_orderadmin_currency", sender).value = valuesRow["currency_code"];
getSameLevelCtl("EntryBlock_ordertotal_currency", sender).value = valuesRow["currency_code"];
getSameLevelCtl("EntryBlock_orderorder_currency_id", sender).value = valuesRow["currency_id"];
} else {
getSameLevelCtl("EntryBlock_orderl2_currency", sender).value = "";
getSameLevelCtl("EntryBlock_orderadmin_currency", sender).value = "";
getSameLevelCtl("EntryBlock_ordertotal_currency", sender).value = "";
getSameLevelCtl("EntryBlock_orderorder_currency_id", sender).value = "";
}
},
onFailure: function(transport) {
alert(transport.responseText);
}
});
}
Line 384: //End PTAutoFill3 Loading

_________________
I may disapprove of what you say, but I will defend to the death your right to say it
View profile  Send private message
x-ray

Posts: 18
Posted: 05/24/2012, 12:56 PM

Sorry, I think this looks/reads better.
361:     if (!sender) return;  
362:     new Ajax.Request("../services/CLSsales_sales_order_entry_EntryBlock_order_order_l2_stock_id_PTAutoFill1.php?keyword=" + encodeURIComponent(sender.value).replace(/'/g, "%27"), {  
363:         method: "get",  

_________________
I may disapprove of what you say, but I will defend to the death your right to say it
View profile  Send private message
clahti2

Posts: 107
Posted: 06/04/2012, 12:11 PM

Quote x-ray:
Sorry, I think this looks/reads better.
361:     if (!sender) return;  
362:     new Ajax.Request("../services/CLSsales_sales_order_entry_EntryBlock_order_order_l2_stock_id_PTAutoFill1.php?keyword=" + encodeURIComponent(sender.value).replace(/'/g, "%27"), {  
363:         method: "get",  

So your answer is the unescaped quote in the regex section (//g), I wonder if adding a backslash would suppress the warning/error
View profile  Send private message
Lucius

Posts: 220
Posted: 06/06/2012, 8:59 AM

Hi,

CCS support knows about this issue. There is no patch, maybe they will fix it in next version of CCS. For now you can ignore the error related to the
replace(/'/g, "%27"), {
piece of code generated. It should not affect your app in any way, except annoying you with the warning.
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.