CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 listbox

Print topic Send  topic

Author Message
rookie
Posted: 12/19/2003, 1:46 PM

Hi,
I have 2 listboxes
a)Course
b)Teacher

If I choose a course (a), the Teachers (b) listbox should only list the
teachers available for that course.

Haw can i do that?

Richard Taylor
Posted: 12/20/2003, 8:31 AM

Good question -- I'm in the middle of trying to figure that one out, too.

Hopefully someone has an answer.

--
Richard Taylor

"rookie" <pcboss1976@hotmail.com> wrote in message
news:brvrj0$ihi$1@news.codecharge.com...
> Hi,
> I have 2 listboxes
> a)Course
> b)Teacher
>
> If I choose a course (a), the Teachers (b) listbox should only list the
> teachers available for that course.
>
> Haw can i do that?
>
>

DonB
Posted: 12/20/2003, 12:49 PM

see discussion here from dec 11th "Subcategories listbox"

--
DonB

http://www.gotodon.com/ccbth


"Richard Taylor" <docmaster@csi.com> wrote in message
news:bs1th0$2h5$1@news.codecharge.com...
> Good question -- I'm in the middle of trying to figure that one out, too.
>
> Hopefully someone has an answer.
>
> --
> Richard Taylor
>
> "rookie" <pcboss1976@hotmail.com> wrote in message
>news:brvrj0$ihi$1@news.codecharge.com...
> > Hi,
> > I have 2 listboxes
> > a)Course
> > b)Teacher
> >
> > If I choose a course (a), the Teachers (b) listbox should only list the
> > teachers available for that course.
> >
> > Haw can i do that?
> >
> >
>
>

Richard Taylor
Posted: 12/20/2003, 5:16 PM

Don,

Thanks. The concept makes sense, but I'm having trouble translating your
"java-speak" into the ASP/VBscript that my project generates. I get that the
WHERE clause of the second listbox needs to reference the contents of the
first, and that the second list needs to be refreshed every time the value
in the first changes. My problem is finding the right code and the right
spot to put it in the generated code to do that. <g>

>>Change the form from method="post" to method="get" <<
I found this nicely.

>> Add this client event to the <SELECT> tag of the parent:
onchange="javascript:this.form.submit()" <<
and the Vbscript version of this is ... ?? this is the missing piece data
for me

>>Modify the datasource of the child to have a "where" that is like:
parent_id=parent_id (type set to URL)<<
I found this nicely, too.

Any help you care to offer is appreciated greatly.

--
Richard Taylor


"DonB" <~ccbth~@gotodon.com> wrote in message
news:bs2ckq$klq$1@news.codecharge.com...
> see discussion here from dec 11th "Subcategories listbox"
>
> --
> DonB
>
> http://www.gotodon.com/ccbth
>
>
> "Richard Taylor" <docmaster@csi.com> wrote in message
>news:bs1th0$2h5$1@news.codecharge.com...
> > Good question -- I'm in the middle of trying to figure that one out,
too.
> >
> > Hopefully someone has an answer.
> >
> > --
> > Richard Taylor
> >
> > "rookie" <pcboss1976@hotmail.com> wrote in message
> >news:brvrj0$ihi$1@news.codecharge.com...
> > > Hi,
> > > I have 2 listboxes
> > > a)Course
> > > b)Teacher
> > >
> > > If I choose a course (a), the Teachers (b) listbox should only list
the
> > > teachers available for that course.
> > >
> > > Haw can i do that?
> > >
> > >
> >
> >
>
>

DonB
Posted: 12/21/2003, 7:53 AM

Not sure at all what the VBscript equivalent would be, but I'd never use it
because that would most certainly ONLY work with Internet Explorer. If you
must succumb to using any script in the browser (sometimes it is a necessary
evil) by all means use javascript so you have a reasonable chance of it
working in Netscape, Mozilla, etc.

The example is used exactly as shown, it generically refers to the current
document, the current form and does exactly what it's "submit" button would
do.

--
DonB

http://www.gotodon.com/ccbth


"Richard Taylor" <docmaster@csi.com> wrote in message
news:bs2s8s$8aa$1@news.codecharge.com...
> Don,
>

> >> Add this client event to the <SELECT> tag of the parent:
> onchange="javascript:this.form.submit()" <<
> and the Vbscript version of this is ... ?? this is the missing piece data
> for me

Richard Taylor
Posted: 12/21/2003, 2:32 PM

Thanks Don, that worked exactly as advertised. <g>

Unfortunately, now my data entry no longer ends up in the database -- IOW,
the Add button doesn't add a record. I assume that that's what GET vs POST
fro the form means.

Any suggestions?

--
Richard Taylor

"DonB" <~ccbth~@gotodon.com> wrote in message
news:bs4fle$7va$1@news.codecharge.com...
> Not sure at all what the VBscript equivalent would be, but I'd never use
it
> because that would most certainly ONLY work with Internet Explorer. If
you
> must succumb to using any script in the browser (sometimes it is a
necessary
> evil) by all means use javascript so you have a reasonable chance of it
> working in Netscape, Mozilla, etc.
>
> The example is used exactly as shown, it generically refers to the current
> document, the current form and does exactly what it's "submit" button
would
> do.
>
> --
> DonB
>
> http://www.gotodon.com/ccbth
>
>
> "Richard Taylor" <docmaster@csi.com> wrote in message
>news:bs2s8s$8aa$1@news.codecharge.com...
> > Don,
> >
>
> > >> Add this client event to the <SELECT> tag of the parent:
> > onchange="javascript:this.form.submit()" <<
> > and the Vbscript version of this is ... ?? this is the missing piece
data
> > for me
>
>

Richard Taylor
Posted: 12/21/2003, 4:08 PM

Don,

I got a work-around going, but I'd still like to hear any suggestions you
might have as to how you would've handled it.

--
Richard Taylor

"Richard Taylor" <docmaster@csi.com> wrote in message
news:bs572f$5bi$1@news.codecharge.com...
> Thanks Don, that worked exactly as advertised. <g>
>
> Unfortunately, now my data entry no longer ends up in the database -- IOW,
> the Add button doesn't add a record. I assume that that's what GET vs POST
> fro the form means.
>
> Any suggestions?
>
> --
> Richard Taylor
>
> "DonB" <~ccbth~@gotodon.com> wrote in message
>news:bs4fle$7va$1@news.codecharge.com...
> > Not sure at all what the VBscript equivalent would be, but I'd never use
> it
> > because that would most certainly ONLY work with Internet Explorer. If
> you
> > must succumb to using any script in the browser (sometimes it is a
> necessary
> > evil) by all means use javascript so you have a reasonable chance of it
> > working in Netscape, Mozilla, etc.
> >
> > The example is used exactly as shown, it generically refers to the
current
> > document, the current form and does exactly what it's "submit" button
> would
> > do.
> >
> > --
> > DonB
> >
> > http://www.gotodon.com/ccbth
> >
> >
> > "Richard Taylor" <docmaster@csi.com> wrote in message
> >news:bs2s8s$8aa$1@news.codecharge.com...
> > > Don,
> > >
> >
> > > >> Add this client event to the <SELECT> tag of the parent:
> > > onchange="javascript:this.form.submit()" <<
> > > and the Vbscript version of this is ... ?? this is the missing piece
> data
> > > for me
> >
> >
>
>

Sean Brown
Posted: 01/07/2004, 6:48 AM

Has anyone found a solution to this? I cannot find the post from Dec. 11
(was it removed??). I tried the example on the CodeCharge website, but I am
having problems.

My project background: (ASP, Access 2000, CCS 2.2)
I have a grid form that has customer information. When I click the customer
name (referenced by CustomerID), it takes me to an update form where I can
change the information. In this update form is; First Name, Last Name,
Address, Phone, etc, plus Make and Model (for what type of automobile they
own). The Make and Model labels are actually list boxes. Model is (or
should be) dependent upon the Make value in the first list box. Ex. When I
select "Ford", the second list box should populate only Ford Vehicles.

When I select my first list box, the screen refreshes and the second
populates with the desired data, but then the first list box does not keep
it's original value. It returns to "Select Value" status.

Also, since the screen refreshes, it takes out the CustomerID parameter that
I need in the address bar (CustomerID=###). Without this, I cannot make the
change to the record that I am trying to make.

I will provide any additional info if needed.

Thanks.

"Richard Taylor" <docmaster@csi.com> wrote in message
news:bs5cml$cc6$1@news.codecharge.com...
> Don,
>
> I got a work-around going, but I'd still like to hear any suggestions you
> might have as to how you would've handled it.
>
> --
> Richard Taylor
>
> "Richard Taylor" <docmaster@csi.com> wrote in message
>news:bs572f$5bi$1@news.codecharge.com...
> > Thanks Don, that worked exactly as advertised. <g>
> >
> > Unfortunately, now my data entry no longer ends up in the database --
IOW,
> > the Add button doesn't add a record. I assume that that's what GET vs
POST
> > fro the form means.
> >
> > Any suggestions?
> >
> > --
> > Richard Taylor
> >
> > "DonB" <~ccbth~@gotodon.com> wrote in message
> >news:bs4fle$7va$1@news.codecharge.com...
> > > Not sure at all what the VBscript equivalent would be, but I'd never
use
> > it
> > > because that would most certainly ONLY work with Internet Explorer.
If
> > you
> > > must succumb to using any script in the browser (sometimes it is a
> > necessary
> > > evil) by all means use javascript so you have a reasonable chance of
it
> > > working in Netscape, Mozilla, etc.
> > >
> > > The example is used exactly as shown, it generically refers to the
> current
> > > document, the current form and does exactly what it's "submit" button
> > would
> > > do.
> > >
> > > --
> > > DonB
> > >
> > > http://www.gotodon.com/ccbth
> > >
> > >
> > > "Richard Taylor" <docmaster@csi.com> wrote in message
> > >news:bs2s8s$8aa$1@news.codecharge.com...
> > > > Don,
> > > >
> > >
> > > > >> Add this client event to the <SELECT> tag of the parent:
> > > > onchange="javascript:this.form.submit()" <<
> > > > and the Vbscript version of this is ... ?? this is the missing piece
> > data
> > > > for me
> > >
> > >
> >
> >
>
>


   


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

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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