CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 dependent listbox feature builder not working

Print topic Send  topic

Author Message
CodeChargenewbie

Posts: 114
Posted: 02/28/2008, 11:15 AM

I created two listboxes. Their datasets are correlated base upon database fields. I know I set up the relation correctly using the feature builder. The problem is when i select an item in the master listbox, i get a javascript erro that says 'id' is null or not an object. I didn't make any changes to the listboxes; codecharge filled in the id fields automatically (it's been doing that for everything since the update to 4.0). The only thing I did, of course, was specify the dataset for the master listbox so that it could properly correlate with the slave listbox. Maybe someone can help me and make me understand how to get this working.

thank you.
View profile  Send private message
CodeChargenewbie

Posts: 114
Posted: 02/29/2008, 6:05 AM

Just wanted to add that I had to make the dependent listbox functionality myself. The problem is not the service page but the javascript code generated by codecharge. Apparently, the "sender" parameter is undefined.

function NewRecord1ModelPTDependentListBox1_start(sender) {  
var dependentElement = $("NewRecord1Model" + sender.id.substring(14));  
...  

Why is it undefined? Good question. I had another person here do the exact same thing on his machine and codecharge did it just fine. Why does it not work on my machine is very strange. I did the exact same thing as this other person, i mean exact. The project was converted from 3.2 to 4.0 and he did select the option to let codecharge convert the ids. But that affects the entire project, not specific codecharge installations. I have no clue why this is happening, I really don't. The only thing he said that his codecharge did differently was publish the service page automatically, whereas I had to do it myself. Maybe that's something, I don't know.
View profile  Send private message
tallmik

Posts: 23
Posted: 03/10/2008, 1:36 PM

Very interesting... I've had a similar issue.

Autocomplete and autofill work ok, but the dependent list boxes do not. I'll try installing CCS4 on another machine, but am holding off putting it on my development PC until everything is cool.

This happens for me either with 3.2 projects i import, new projects i create, or even when i try to set up the CCS4 demo suite.

Would sure be great if anyone has any ideas... I've written to Yes, and was told they can't replicate the situation... interesting to see it's happening to someone else too.

Michael
View profile  Send private message
azimuth024

Posts: 9
Posted: 03/12/2008, 2:56 AM

I have the same problem, i solved it.
In CCS demo versions, every page outputs with "Generated by CCS" at bottom of pages.
Even in services pages : this makes the service output malformed, so ajax don't work.
After publishing your project, edit the service php file on the web server and delete line at bottom of the files :
Delete all lines between
if (!isset($main_block)) $main_block = $Tpl->GetVar($BlockToParse);
and line
$main_block = CCConvertEncoding($main_block, $FileEncoding, $CCSLocales->GetFormatInfo("Encoding"));
Don't delete if(!isset($mainblock) and $main_block lines.

This make service and ajax working.

The ultimate solution is buying CCS.


View profile  Send private message
CodeChargenewbie

Posts: 114
Posted: 03/12/2008, 6:28 AM

I have the FULL licensed version of CCS 4.0 and am having this issue; so, at least in my case, trial or paid version is irrelevent. I will attempt your solution, however, and report back.
View profile  Send private message
tallmik

Posts: 23
Posted: 03/12/2008, 10:51 AM

azimuth024... I tried your suggestion, and it works for me... i commented out the "if block" right after the string you said to search for.

I have to admit i was a bit nervous about buying the upgrade if the demo software didn't work, but now i feel a lot better... Thanks!

M
View profile  Send private message
CodeChargenewbie

Posts: 114
Posted: 03/12/2008, 1:03 PM

Quote azimuth024:
I have the same problem, i solved it.
In CCS demo versions, every page outputs with "Generated by CCS" at bottom of pages.
Even in services pages : this makes the service output malformed, so ajax don't work.
After publishing your project, edit the service php file on the web server and delete line at bottom of the files :
Delete all lines between
if (!isset($main_block)) $main_block = $Tpl->GetVar($BlockToParse);
and line
$main_block = CCConvertEncoding($main_block, $FileEncoding, $CCSLocales->GetFormatInfo("Encoding"));
Don't delete if(!isset($mainblock) and $main_block lines.

This make service and ajax working.

The ultimate solution is buying CCS.

I don't even see this line in my php file --
$main_block = CCConvertEncoding($main_block, $FileEncoding, $CCSLocales->GetFormatInfo("Encoding"));

This is what I have at the bottom:

Quote :
...
if (!isset($main_block)) $main_block = $Tpl->GetVar($BlockToParse);
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage);
if ($CCSEventResult) echo $main_block;
//End Show Page

Am I suppose to delete everything between the if statement and the comment?

Well I experiemented a bit, commenting out these lines, and this won't solve my problem, unfortunately. For some reason, the id is "null or not an object" (which is why I had to make my own ajax call to the service page to get this working). My issue is the javascript-generated code, not the service page.
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.