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

 problem with dependent listboxes

Print topic Send  topic

Author Message
bate_ico

Posts: 30
Posted: 04/21/2010, 12:56 AM

Hi I try to build a dependent listboxes but when I generate project do nothing

i put the java source from exampls
---------------------------------------------------------------------
<script language="JavaScript">
var DomYes=document.getElementById?1:0;

function set_child_listbox(parentObject,childObject,childArray,spanToHide) {

//Clear child listbox
for(var i=childObject.length;i>0;i--) {
childObject.options = null;
}

childObject.options[0] = new Option("Select Value","");
var sel_index = parentObject.options[parentObject.selectedIndex].value;
if (sel_index == "") {
childObject.disabled = true;
} else {
childObject.disabled = false;
var childIndex = 1;
for (i = 0; i < childArray.length; i++) {
if (childArray[1] == sel_index) {
childObject.options[childIndex] = new Option(childArray[2], childArray[0]);
childIndex++;
}
}
}
//Select first option
childObject.selectedIndex = 0;

//Hide dependent grid
if (spanToHide != "") {
if (DomYes) {
document.getElementById(spanToHide).style.display="none";
} else {
document.all[spanToHide].style.display="none";
}
}
}

function reload_page() {
var sel_index = document.store_productsSearch.s_category_id.options[document.store_productsSearch.s_category_id.selectedIndex].value;
var sel_subindex = document.store_productsSearch.s_product_id.options[document.store_productsSearch.s_product_id.selectedIndex].value;
if (sel_subindex != "") {
document.location.href = document.location.pathname + "?" + "s_product_id=" + sel_subindex+"&s_category_id=" + sel_index;
}
}

function disable_child_listbox(spanToHide) {

//Disable second listbox
if (document.store_productsSearch.s_category_id.selectedIndex == "") {
document.store_productsSearch.s_product_id.disabled = true;
}

//Hide dependent grid
if (document.store_productsSearch.s_product_id.selectedIndex == "") {
if (spanToHide != "") {
if (DomYes) {
document.getElementById(spanToHide).style.display="none";
} else {
document.all[spanToHide].style.display="none";
}
}
}
}

window.onload = function() {
disable_child_listbox("Products");
}


var Product = new Array(

new Array(21,3,"1001 Web Site Tips and Tricks"),
new Array(18,1,"Beginning Active Server Pages 3.0"),
new Array(10,2,"Beginning ASP Databases"),
new Array(12,1,"Black Belt Web Programming Methods"),
new Array(22,1,"C# - Programming"),
new Array(17,1,"ColdFusion Fast & Easy Development"),
new Array(8,3,"Flash 4 Magic"),
new Array(20,3,"HTML 4"),
new Array(15,1,"Mastering ColdFusion 4.5"),
new Array(4,2,"MySQL"),
new Array(6,1,"MySQL & PHP From Scratch"),
new Array(7,2,"MySQL and mSQL"),
new Array(11,2,"Oracle8i Web Development"),
new Array(3,1,"Perl and CGI for the World Wide Web"),
new Array(5,1,"PHP and MySQL Web Development"),
new Array(14,1,"Professional JSP J2EE Edition"),
new Array(2,1,"Programming Perl"),
new Array(16,1,"Teach Yourself ColdFusion in 21 Days"),
new Array(1,2,"Web Database Development"),
new Array(19,3,"Web Design in a Nutshell"),
new Array(13,1,"Web Development with JSP"),
new Array(9,1,"Web Development with PHP 4.0")
);


</script>

---------------------------------------------------------------------
is this a right script for this example .
I want to dispay only the directory and sub directory
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 05/16/2010, 11:31 AM

bate_ico
Have you been able to resolve this issue??
View profile  Send private message
bate_ico

Posts: 30
Posted: 05/25/2010, 4:01 AM

no, still the same :-/
View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 05/29/2010, 1:28 AM

What version CCS are you using?
_________________
Central Coast, NSW, Australia.

View profile  Send private message
bate_ico

Posts: 30
Posted: 05/29/2010, 2:47 AM

I USE 4.0 VERSION
View profile  Send private message
CodeChargeMVP

Posts: 473
Posted: 05/29/2010, 8:10 AM

Hello,

I Suggest you to check out www.examples.codecharge.com ,

search two dependant listboxes.

just following the instructions itīs all easy except when

feauture builder crashes and says builder finish

and you canīt work for two weeks.


_________________
Best Regards
Entrepeneur | NT Consultant
View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 05/30/2010, 12:47 PM

Hi,

Yes I use feature builder successfully all the time for dependant listboxes, this feature has become stable after recent ccs upgrade, so could any other problem perhaps be Windows related?
_________________
Central Coast, NSW, Australia.

View profile  Send private message
masterpiece

Posts: 5
Posted: 06/01/2010, 12:39 PM

I created a dependent list boxes but I don't know how could integrate them to use it on the web. and if I load the html page the form is not working.
View profile  Send private message
damian

Posts: 838
Posted: 06/01/2010, 3:50 PM

load the php page...
_________________
if you found this post useful take the time to help someone else.... :)
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.