CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Advanced Database search example wanted

Print topic Send  topic

Author Message
oscar
Posted: 02/22/2001, 3:11 PM

Hi,

I am currently trying CC and I was wondering whether someone could give me a
full example site with working dynamic list boxes that update eachother
rather than send the results to the next page. So to narrow down a search of
a database!
If data is ordered like this ----->>

Group 1
- Sub 1
-Subsub 1
-Subsub 2
-Subsub 3
- Sub 2
-Subsub 1
-Subsub 2
-Subsub 3
-Subsub 4
Group 2
-Sub 1
-Subsub 1
-Subsub 2
.....................etc

Than you would have first listbox with the groups, then when a user selects
it will update the second listbox and enter all "subs" then when the user
selects that, the third listbox will be filled with the "subsubs"........and
when an item is selected from this third listbox, the results will be send
to the next page...........where you can page through the remaining records.

Can anyone help me with this or can CodeCharge include a sample CCS file on
the site that I can download.......I find such search sites very usefull !!!

Thanks, Oscar

Alexey Alexapolsky
Posted: 02/23/2001, 5:15 AM

Hello ,

You can do it in on client side (with Javascript events)
and on server side :

1) Example html+javascript (runn this in your borwser)
<body>
<script language="javascript">

function ChangeCats()
{
switch (document.forms[0].elements[0].selectedIndex) {
case 0 : document.forms[0].elements[1].options[0].text="Internet";
document.forms[0].elements[1].options[1].text="Hardware news";break;
case 1: document.forms[0].elements[1].options[0].text="Movies";
document.forms[0].elements[1].options[1].text="Hobbies";break;
}

}
</script>

<form name="form" action="script.asp">
<select name="groups" onChange="ChangeCats()">
<option>Computers</option>
<option>Entertainment</option>
</select>

<select name="cats">
<option>Internet</option>
<option>Hardware news</option>
</select>

</form>
</body>

It can easiliy be changed for work with 3 or more listobxes.

2) On server side , it only makes sense if these listbox values are stored
in a database.
Create a form
Create a couple of fields of "listbox" type , create a database that will
store required info :
e.g. table categories {category_name,category_parent_id,level}
parant_id will be required to know where this subcategry belongs , if it's
not top level.
then , you must attach onlick event to a given listbox.
and table items {item_name,category_id}
You will need to set OnChange() javascript evets for given
listboxes(selects) in your html code ,
they will submit this form to the same page , but with newly selected
parameter.
The last listbox will simply display item that has id+sub_id in database.
When last box is changes it'll be redirected somewhere else.

Which way do you prefer ?

--
Regards,
Alexey
CodeCharge Support

oscar <oscar@rx-tech.com> wrote in message
news:9746b9$mf6$1@news.codecharge.com...
> Hi,
>
> I am currently trying CC and I was wondering whether someone could give me
a
> full example site with working dynamic list boxes that update eachother
> rather than send the results to the next page. So to narrow down a search
of
> a database!
> If data is ordered like this ----->>
>
> Group 1
> - Sub 1
> -Subsub 1
> -Subsub 2
> -Subsub 3
> - Sub 2
> -Subsub 1
> -Subsub 2
> -Subsub 3
> -Subsub 4
> Group 2
> -Sub 1
> -Subsub 1
> -Subsub 2
> .....................etc
>
> Than you would have first listbox with the groups, then when a user
selects
> it will update the second listbox and enter all "subs" then when the user
> selects that, the third listbox will be filled with the
"subsubs"........and
> when an item is selected from this third listbox, the results will be send
> to the next page...........where you can page through the remaining
records.
>
> Can anyone help me with this or can CodeCharge include a sample CCS file
on
> the site that I can download.......I find such search sites very usefull
!!!
>
> Thanks, Oscar
>
>

oscar
Posted: 02/23/2001, 7:33 AM

Thanks, Alexey!
I prefer the second scenario. Or maybe a combination........with a database
filling client side arrays and these arrays will be used to fill the
listboxes. Could you please explain to me how to do this and maybe could you
include a working example with 3 listboxes that update eachother as soon as
you select an item????? Maybe you can set an example up for one of the
databases included with CodeCharge?
I could also send you a copy of my database.......all the data is stored in
one table and there is no key field! That might be the biggest problem
there.

Thanks so much!



Alexey Alexapolsky <alexa@codecharge.com> wrote in message
news:975npr$ds3$1@news.codecharge.com...
> Hello ,
>
> You can do it in on client side (with Javascript events)
> and on server side :
>
> 1) Example html+javascript (runn this in your borwser)
> <body>
> <script language="javascript">
>
> function ChangeCats()
> {
> switch (document.forms[0].elements[0].selectedIndex) {
> case 0 : document.forms[0].elements[1].options[0].text="Internet";
> document.forms[0].elements[1].options[1].text="Hardware news";break;
> case 1: document.forms[0].elements[1].options[0].text="Movies";
> document.forms[0].elements[1].options[1].text="Hobbies";break;
> }
>
> }
> </script>
>
> <form name="form" action="script.asp">
> <select name="groups" onChange="ChangeCats()">
> <option>Computers</option>
> <option>Entertainment</option>
> </select>
>
> <select name="cats">
> <option>Internet</option>
> <option>Hardware news</option>
> </select>
>
> </form>
> </body>
>
> It can easiliy be changed for work with 3 or more listobxes.
>
> 2) On server side , it only makes sense if these listbox values are stored
> in a database.
> Create a form
> Create a couple of fields of "listbox" type , create a database that
will
> store required info :
> e.g. table categories {category_name,category_parent_id,level}
> parant_id will be required to know where this subcategry belongs , if it's
> not top level.
> then , you must attach onlick event to a given listbox.
> and table items {item_name,category_id}
> You will need to set OnChange() javascript evets for given
> listboxes(selects) in your html code ,
> they will submit this form to the same page , but with newly selected
> parameter.
> The last listbox will simply display item that has id+sub_id in database.
> When last box is changes it'll be redirected somewhere else.
>
> Which way do you prefer ?
>
> --
> Regards,
> Alexey
> CodeCharge Support
>
> oscar <oscar@rx-tech.com> wrote in message
>news:9746b9$mf6$1@news.codecharge.com...
> > Hi,
> >
> > I am currently trying CC and I was wondering whether someone could give
me
> a
> > full example site with working dynamic list boxes that update eachother
> > rather than send the results to the next page. So to narrow down a
search
> of
> > a database!
> > If data is ordered like this ----->>
> >
> > Group 1
> > - Sub 1
> > -Subsub 1
> > -Subsub 2
> > -Subsub 3
> > - Sub 2
> > -Subsub 1
> > -Subsub 2
> > -Subsub 3
> > -Subsub 4
> > Group 2
> > -Sub 1
> > -Subsub 1
> > -Subsub 2
> > .....................etc
> >
> > Than you would have first listbox with the groups, then when a user
> selects
> > it will update the second listbox and enter all "subs" then when the
user
> > selects that, the third listbox will be filled with the
> "subsubs"........and
> > when an item is selected from this third listbox, the results will be
send
> > to the next page...........where you can page through the remaining
> records.
> >
> > Can anyone help me with this or can CodeCharge include a sample CCS file
> on
> > the site that I can download.......I find such search sites very usefull
> !!!
> >
> > Thanks, Oscar
> >
> >
>
>

Paul
Posted: 02/23/2001, 9:23 AM

Well while their at it Oscar maybe you'd like them to serve tea and cakes at
four! ;-)

Paul
oscar wrote in message <975vrq$tb0$1@news.codecharge.com>...
>Thanks, Alexey!
>I prefer the second scenario. Or maybe a combination........with a database
>filling client side arrays and these arrays will be used to fill the
>listboxes. Could you please explain to me how to do this and maybe could
you
>include a working example with 3 listboxes that update eachother as soon as
>you select an item????? Maybe you can set an example up for one of the
>databases included with CodeCharge?
>I could also send you a copy of my database.......all the data is stored in
>one table and there is no key field! That might be the biggest problem
>there.
>
>Thanks so much!
>
>
>
>Alexey Alexapolsky <alexa@codecharge.com> wrote in message
>news:975npr$ds3$1@news.codecharge.com...
>> Hello ,
>>
>> You can do it in on client side (with Javascript events)
>> and on server side :
>>
>> 1) Example html+javascript (runn this in your borwser)
>> <body>
>> <script language="javascript">
>>
>> function ChangeCats()
>> {
>> switch (document.forms[0].elements[0].selectedIndex) {
>> case 0 : document.forms[0].elements[1].options[0].text="Internet";
>> document.forms[0].elements[1].options[1].text="Hardware news";break;
>> case 1: document.forms[0].elements[1].options[0].text="Movies";
>> document.forms[0].elements[1].options[1].text="Hobbies";break;
>> }
>>
>> }
>> </script>
>>
>> <form name="form" action="script.asp">
>> <select name="groups" onChange="ChangeCats()">
>> <option>Computers</option>
>> <option>Entertainment</option>
>> </select>
>>
>> <select name="cats">
>> <option>Internet</option>
>> <option>Hardware news</option>
>> </select>
>>
>> </form>
>> </body>
>>
>> It can easiliy be changed for work with 3 or more listobxes.
>>
>> 2) On server side , it only makes sense if these listbox values are
stored
>> in a database.
>> Create a form
>> Create a couple of fields of "listbox" type , create a database that
>will
>> store required info :
>> e.g. table categories {category_name,category_parent_id,level}
>> parant_id will be required to know where this subcategry belongs , if
it's
>> not top level.
>> then , you must attach onlick event to a given listbox.
>> and table items {item_name,category_id}
>> You will need to set OnChange() javascript evets for given
>> listboxes(selects) in your html code ,
>> they will submit this form to the same page , but with newly selected
>> parameter.
>> The last listbox will simply display item that has id+sub_id in database.
>> When last box is changes it'll be redirected somewhere else.
>>
>> Which way do you prefer ?
>>
>> --
>> Regards,
>> Alexey
>> CodeCharge Support
>>
>> oscar <oscar@rx-tech.com> wrote in message
>>news:9746b9$mf6$1@news.codecharge.com...
>> > Hi,
>> >
>> > I am currently trying CC and I was wondering whether someone could give
>me
>> a
>> > full example site with working dynamic list boxes that update eachother
>> > rather than send the results to the next page. So to narrow down a
>search
>> of
>> > a database!
>> > If data is ordered like this ----->>
>> >
>> > Group 1
>> > - Sub 1
>> > -Subsub 1
>> > -Subsub 2
>> > -Subsub 3
>> > - Sub 2
>> > -Subsub 1
>> > -Subsub 2
>> > -Subsub 3
>> > -Subsub 4
>> > Group 2
>> > -Sub 1
>> > -Subsub 1
>> > -Subsub 2
>> > .....................etc
>> >
>> > Than you would have first listbox with the groups, then when a user
>> selects
>> > it will update the second listbox and enter all "subs" then when the
>user
>> > selects that, the third listbox will be filled with the
>> "subsubs"........and
>> > when an item is selected from this third listbox, the results will be
>send
>> > to the next page...........where you can page through the remaining
>> records.
>> >
>> > Can anyone help me with this or can CodeCharge include a sample CCS
file
>> on
>> > the site that I can download.......I find such search sites very
usefull
>> !!!
>> >
>> > Thanks, Oscar
>> >
>> >
>>
>>
>
>

oscar
Posted: 02/23/2001, 9:45 AM

Paul,
I could do tea and cakes!
I just like to see what the potential of this software is. Are they going to
streamline in Javascripts and more options what the search of databases are
concerned. What I am trying to get done is to have CodeCharge include these
options in their software. If they are working on including more advanced
and more detailed option in the software....the more interesting the
software becomes. I understand there are also some problems with getting
data form multiple tables and including them together.........the software
needs to correct this, because sometimes you are not able to change the
layout of a database and therefore, having the options in the software is so
important. If they have problems incorporating more advanced options in
their software...............then future does not look to
promising..........I mean if I have a copy of all those examples they give
with software, I can alter it myself and have most basic applications. But
that is not what I want, if I want to buy this program, then I need to be
able to have more flexibility in creating applications.

For example: with the listboxes --->> 1. use Javascript to fill next listbox
OnSelect()
2. use buttons with each listbox.
etc.
CodeCharge created several options for making the database connection.....
all I wish for is the same with search options, Javascript option (just like
with style sheets) etc etc etc. I know this is a new software, but I need to
know its future potential in order to be interested.

Oscar

But hey, I'll go for just the tea and cakes for now!

Paul <paporter@visto.com> wrote in message
news:9766a0$9m3$1@news.codecharge.com...
> Well while their at it Oscar maybe you'd like them to serve tea and cakes
at
> four! ;-)
>
> Paul
> oscar wrote in message <975vrq$tb0$1@news.codecharge.com>...
> >Thanks, Alexey!
> >I prefer the second scenario. Or maybe a combination........with a
database
> >filling client side arrays and these arrays will be used to fill the
> >listboxes. Could you please explain to me how to do this and maybe could
> you
> >include a working example with 3 listboxes that update eachother as soon
as
> >you select an item????? Maybe you can set an example up for one of the
> >databases included with CodeCharge?
> >I could also send you a copy of my database.......all the data is stored
in
> >one table and there is no key field! That might be the biggest problem
> >there.
> >
> >Thanks so much!
> >
> >
> >
> >Alexey Alexapolsky <alexa@codecharge.com> wrote in message
> >news:975npr$ds3$1@news.codecharge.com...
> >> Hello ,
> >>
> >> You can do it in on client side (with Javascript events)
> >> and on server side :
> >>
> >> 1) Example html+javascript (runn this in your borwser)
> >> <body>
> >> <script language="javascript">
> >>
> >> function ChangeCats()
> >> {
> >> switch (document.forms[0].elements[0].selectedIndex) {
> >> case 0 : document.forms[0].elements[1].options[0].text="Internet";
> >> document.forms[0].elements[1].options[1].text="Hardware news";break;
> >> case 1: document.forms[0].elements[1].options[0].text="Movies";
> >> document.forms[0].elements[1].options[1].text="Hobbies";break;
> >> }
> >>
> >> }
> >> </script>
> >>
> >> <form name="form" action="script.asp">
> >> <select name="groups" onChange="ChangeCats()">
> >> <option>Computers</option>
> >> <option>Entertainment</option>
> >> </select>
> >>
> >> <select name="cats">
> >> <option>Internet</option>
> >> <option>Hardware news</option>
> >> </select>
> >>
> >> </form>
> >> </body>
> >>
> >> It can easiliy be changed for work with 3 or more listobxes.
> >>
> >> 2) On server side , it only makes sense if these listbox values are
> stored
> >> in a database.
> >> Create a form
> >> Create a couple of fields of "listbox" type , create a database that
> >will
> >> store required info :
> >> e.g. table categories {category_name,category_parent_id,level}
> >> parant_id will be required to know where this subcategry belongs , if
> it's
> >> not top level.
> >> then , you must attach onlick event to a given listbox.
> >> and table items {item_name,category_id}
> >> You will need to set OnChange() javascript evets for given
> >> listboxes(selects) in your html code ,
> >> they will submit this form to the same page , but with newly selected
> >> parameter.
> >> The last listbox will simply display item that has id+sub_id in
database.
> >> When last box is changes it'll be redirected somewhere else.
> >>
> >> Which way do you prefer ?
> >>
> >> --
> >> Regards,
> >> Alexey
> >> CodeCharge Support
> >>
> >> oscar <oscar@rx-tech.com> wrote in message
> >>news:9746b9$mf6$1@news.codecharge.com...
> >> > Hi,
> >> >
> >> > I am currently trying CC and I was wondering whether someone could
give
> >me
> >> a
> >> > full example site with working dynamic list boxes that update
eachother
> >> > rather than send the results to the next page. So to narrow down a
> >search
> >> of
> >> > a database!
> >> > If data is ordered like this ----->>
> >> >
> >> > Group 1
> >> > - Sub 1
> >> > -Subsub 1
> >> > -Subsub 2
> >> > -Subsub 3
> >> > - Sub 2
> >> > -Subsub 1
> >> > -Subsub 2
> >> > -Subsub 3
> >> > -Subsub 4
> >> > Group 2
> >> > -Sub 1
> >> > -Subsub 1
> >> > -Subsub 2
> >> > .....................etc
> >> >
> >> > Than you would have first listbox with the groups, then when a user
> >> selects
> >> > it will update the second listbox and enter all "subs" then when the
> >user
> >> > selects that, the third listbox will be filled with the
> >> "subsubs"........and
> >> > when an item is selected from this third listbox, the results will be
> >send
> >> > to the next page...........where you can page through the remaining
> >> records.
> >> >
> >> > Can anyone help me with this or can CodeCharge include a sample CCS
> file
> >> on
> >> > the site that I can download.......I find such search sites very
> usefull
> >> !!!
> >> >
> >> > Thanks, Oscar
> >> >
> >> >
> >>
> >>
> >
> >
>
>

CodeCharge
Posted: 02/23/2001, 11:23 AM

We will probably create an example for you in the next few days.
However, we also understand the need of attaching JavaScript and reusable
components/Events within CodeCharge.
This is something we're working on.
However our key focus is to release a more graphical version of CodeCharge
within 4 months, and JavaScript will fit even more naturally in such
environment.

Adam

"oscar" <oscar@rx-tech.com> wrote in message
news:9767je$c3l$1@news.codecharge.com...
> Paul,
> I could do tea and cakes!
> I just like to see what the potential of this software is. Are they going
to
> streamline in Javascripts and more options what the search of databases
are
> concerned. What I am trying to get done is to have CodeCharge include
these
> options in their software. If they are working on including more advanced
> and more detailed option in the software....the more interesting the
> software becomes. I understand there are also some problems with getting
> data form multiple tables and including them together.........the software
> needs to correct this, because sometimes you are not able to change the
> layout of a database and therefore, having the options in the software is
so
> important. If they have problems incorporating more advanced options in
> their software...............then future does not look to
> promising..........I mean if I have a copy of all those examples they give
> with software, I can alter it myself and have most basic applications. But
> that is not what I want, if I want to buy this program, then I need to be
> able to have more flexibility in creating applications.
>
> For example: with the listboxes --->> 1. use Javascript to fill next
listbox
> OnSelect()
> 2. use buttons with each listbox.
> etc.
> CodeCharge created several options for making the database connection.....
> all I wish for is the same with search options, Javascript option (just
like
> with style sheets) etc etc etc. I know this is a new software, but I need
to
> know its future potential in order to be interested.
>
> Oscar
>
> But hey, I'll go for just the tea and cakes for now!
>
> Paul <paporter@visto.com> wrote in message
>news:9766a0$9m3$1@news.codecharge.com...
> > Well while their at it Oscar maybe you'd like them to serve tea and
cakes
> at
> > four! ;-)
> >
> > Paul
> > oscar wrote in message <975vrq$tb0$1@news.codecharge.com>...
> > >Thanks, Alexey!
> > >I prefer the second scenario. Or maybe a combination........with a
> database
> > >filling client side arrays and these arrays will be used to fill the
> > >listboxes. Could you please explain to me how to do this and maybe
could
> > you
> > >include a working example with 3 listboxes that update eachother as
soon
> as
> > >you select an item????? Maybe you can set an example up for one of the
> > >databases included with CodeCharge?
> > >I could also send you a copy of my database.......all the data is
stored
> in
> > >one table and there is no key field! That might be the biggest problem
> > >there.
> > >
> > >Thanks so much!
> > >
> > >
> > >
> > >Alexey Alexapolsky <alexa@codecharge.com> wrote in message
> > >news:975npr$ds3$1@news.codecharge.com...
> > >> Hello ,
> > >>
> > >> You can do it in on client side (with Javascript events)
> > >> and on server side :
> > >>
> > >> 1) Example html+javascript (runn this in your borwser)
> > >> <body>
> > >> <script language="javascript">
> > >>
> > >> function ChangeCats()
> > >> {
> > >> switch (document.forms[0].elements[0].selectedIndex) {
> > >> case 0 : document.forms[0].elements[1].options[0].text="Internet";
> > >> document.forms[0].elements[1].options[1].text="Hardware
news";break;
> > >> case 1: document.forms[0].elements[1].options[0].text="Movies";
> > >> document.forms[0].elements[1].options[1].text="Hobbies";break;
> > >> }
> > >>
> > >> }
> > >> </script>
> > >>
> > >> <form name="form" action="script.asp">
> > >> <select name="groups" onChange="ChangeCats()">
> > >> <option>Computers</option>
> > >> <option>Entertainment</option>
> > >> </select>
> > >>
> > >> <select name="cats">
> > >> <option>Internet</option>
> > >> <option>Hardware news</option>
> > >> </select>
> > >>
> > >> </form>
> > >> </body>
> > >>
> > >> It can easiliy be changed for work with 3 or more listobxes.
> > >>
> > >> 2) On server side , it only makes sense if these listbox values are
> > stored
> > >> in a database.
> > >> Create a form
> > >> Create a couple of fields of "listbox" type , create a database
that
> > >will
> > >> store required info :
> > >> e.g. table categories {category_name,category_parent_id,level}
> > >> parant_id will be required to know where this subcategry belongs , if
> > it's
> > >> not top level.
> > >> then , you must attach onlick event to a given listbox.
> > >> and table items {item_name,category_id}
> > >> You will need to set OnChange() javascript evets for given
> > >> listboxes(selects) in your html code ,
> > >> they will submit this form to the same page , but with newly selected
> > >> parameter.
> > >> The last listbox will simply display item that has id+sub_id in
> database.
> > >> When last box is changes it'll be redirected somewhere else.
> > >>
> > >> Which way do you prefer ?
> > >>
> > >> --
> > >> Regards,
> > >> Alexey
> > >> CodeCharge Support
> > >>
> > >> oscar <oscar@rx-tech.com> wrote in message
> > >>news:9746b9$mf6$1@news.codecharge.com...
> > >> > Hi,
> > >> >
> > >> > I am currently trying CC and I was wondering whether someone could
> give
> > >me
> > >> a
> > >> > full example site with working dynamic list boxes that update
> eachother
> > >> > rather than send the results to the next page. So to narrow down a
> > >search
> > >> of
> > >> > a database!
> > >> > If data is ordered like this ----->>
> > >> >
> > >> > Group 1
> > >> > - Sub 1
> > >> > -Subsub 1
> > >> > -Subsub 2
> > >> > -Subsub 3
> > >> > - Sub 2
> > >> > -Subsub 1
> > >> > -Subsub 2
> > >> > -Subsub 3
> > >> > -Subsub 4
> > >> > Group 2
> > >> > -Sub 1
> > >> > -Subsub 1
> > >> > -Subsub 2
> > >> > .....................etc
> > >> >
> > >> > Than you would have first listbox with the groups, then when a user
> > >> selects
> > >> > it will update the second listbox and enter all "subs" then when
the
> > >user
> > >> > selects that, the third listbox will be filled with the
> > >> "subsubs"........and
> > >> > when an item is selected from this third listbox, the results will
be
> > >send
> > >> > to the next page...........where you can page through the remaining
> > >> records.
> > >> >
> > >> > Can anyone help me with this or can CodeCharge include a sample CCS
> > file
> > >> on
> > >> > the site that I can download.......I find such search sites very
> > usefull
> > >> !!!
> > >> >
> > >> > Thanks, Oscar
> > >> >
> > >> >
> > >>
> > >>
> > >
> > >
> >
> >
>
>

Paul
Posted: 02/23/2001, 11:42 AM

I appreciate your position oscar, as well as your ability to take a joke :-)

Paul
oscar wrote in message <9767je$c3l$1@news.codecharge.com>...
>Paul,
>I could do tea and cakes!
>I just like to see what the potential of this software is. Are they going
to
>streamline in Javascripts and more options what the search of databases are
>concerned. What I am trying to get done is to have CodeCharge include these
>options in their software. If they are working on including more advanced
>and more detailed option in the software....the more interesting the
>software becomes. I understand there are also some problems with getting
>data form multiple tables and including them together.........the software
>needs to correct this, because sometimes you are not able to change the
>layout of a database and therefore, having the options in the software is
so
>important. If they have problems incorporating more advanced options in
>their software...............then future does not look to
>promising..........I mean if I have a copy of all those examples they give
>with software, I can alter it myself and have most basic applications. But
>that is not what I want, if I want to buy this program, then I need to be
>able to have more flexibility in creating applications.
>
>For example: with the listboxes --->> 1. use Javascript to fill next
listbox
>OnSelect()
>2. use buttons with each listbox.
>etc.
>CodeCharge created several options for making the database connection.....
>all I wish for is the same with search options, Javascript option (just
like
>with style sheets) etc etc etc. I know this is a new software, but I need
to
>know its future potential in order to be interested.
>
>Oscar
>
>But hey, I'll go for just the tea and cakes for now!
>
>Paul <paporter@visto.com> wrote in message
>news:9766a0$9m3$1@news.codecharge.com...
>> Well while their at it Oscar maybe you'd like them to serve tea and cakes
>at
>> four! ;-)
>>
>> Paul
>> oscar wrote in message <975vrq$tb0$1@news.codecharge.com>...
>> >Thanks, Alexey!
>> >I prefer the second scenario. Or maybe a combination........with a
>database
>> >filling client side arrays and these arrays will be used to fill the
>> >listboxes. Could you please explain to me how to do this and maybe could
>> you
>> >include a working example with 3 listboxes that update eachother as soon
>as
>> >you select an item????? Maybe you can set an example up for one of the
>> >databases included with CodeCharge?
>> >I could also send you a copy of my database.......all the data is stored
>in
>> >one table and there is no key field! That might be the biggest problem
>> >there.
>> >
>> >Thanks so much!
>> >
>> >
>> >
>> >Alexey Alexapolsky <alexa@codecharge.com> wrote in message
>> >news:975npr$ds3$1@news.codecharge.com...
>> >> Hello ,
>> >>
>> >> You can do it in on client side (with Javascript events)
>> >> and on server side :
>> >>
>> >> 1) Example html+javascript (runn this in your borwser)
>> >> <body>
>> >> <script language="javascript">
>> >>
>> >> function ChangeCats()
>> >> {
>> >> switch (document.forms[0].elements[0].selectedIndex) {
>> >> case 0 : document.forms[0].elements[1].options[0].text="Internet";
>> >> document.forms[0].elements[1].options[1].text="Hardware news";break;
>> >> case 1: document.forms[0].elements[1].options[0].text="Movies";
>> >> document.forms[0].elements[1].options[1].text="Hobbies";break;
>> >> }
>> >>
>> >> }
>> >> </script>
>> >>
>> >> <form name="form" action="script.asp">
>> >> <select name="groups" onChange="ChangeCats()">
>> >> <option>Computers</option>
>> >> <option>Entertainment</option>
>> >> </select>
>> >>
>> >> <select name="cats">
>> >> <option>Internet</option>
>> >> <option>Hardware news</option>
>> >> </select>
>> >>
>> >> </form>
>> >> </body>
>> >>
>> >> It can easiliy be changed for work with 3 or more listobxes.
>> >>
>> >> 2) On server side , it only makes sense if these listbox values are
>> stored
>> >> in a database.
>> >> Create a form
>> >> Create a couple of fields of "listbox" type , create a database that
>> >will
>> >> store required info :
>> >> e.g. table categories {category_name,category_parent_id,level}
>> >> parant_id will be required to know where this subcategry belongs , if
>> it's
>> >> not top level.
>> >> then , you must attach onlick event to a given listbox.
>> >> and table items {item_name,category_id}
>> >> You will need to set OnChange() javascript evets for given
>> >> listboxes(selects) in your html code ,
>> >> they will submit this form to the same page , but with newly selected
>> >> parameter.
>> >> The last listbox will simply display item that has id+sub_id in
>database.
>> >> When last box is changes it'll be redirected somewhere else.
>> >>
>> >> Which way do you prefer ?
>> >>
>> >> --
>> >> Regards,
>> >> Alexey
>> >> CodeCharge Support
>> >>
>> >> oscar <oscar@rx-tech.com> wrote in message
>> >>news:9746b9$mf6$1@news.codecharge.com...
>> >> > Hi,
>> >> >
>> >> > I am currently trying CC and I was wondering whether someone could
>give
>> >me
>> >> a
>> >> > full example site with working dynamic list boxes that update
>eachother
>> >> > rather than send the results to the next page. So to narrow down a
>> >search
>> >> of
>> >> > a database!
>> >> > If data is ordered like this ----->>
>> >> >
>> >> > Group 1
>> >> > - Sub 1
>> >> > -Subsub 1
>> >> > -Subsub 2
>> >> > -Subsub 3
>> >> > - Sub 2
>> >> > -Subsub 1
>> >> > -Subsub 2
>> >> > -Subsub 3
>> >> > -Subsub 4
>> >> > Group 2
>> >> > -Sub 1
>> >> > -Subsub 1
>> >> > -Subsub 2
>> >> > .....................etc
>> >> >
>> >> > Than you would have first listbox with the groups, then when a user
>> >> selects
>> >> > it will update the second listbox and enter all "subs" then when the
>> >user
>> >> > selects that, the third listbox will be filled with the
>> >> "subsubs"........and
>> >> > when an item is selected from this third listbox, the results will
be
>> >send
>> >> > to the next page...........where you can page through the remaining
>> >> records.
>> >> >
>> >> > Can anyone help me with this or can CodeCharge include a sample CCS
>> file
>> >> on
>> >> > the site that I can download.......I find such search sites very
>> usefull
>> >> !!!
>> >> >
>> >> > Thanks, Oscar
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>


   


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.