Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 List boxes.
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 06 March 2002 :  05:15:03  Show Profile  Visit Azaniah's Homepage
OK I know I should know this, but my brain has stopped (nothing new).

I have 2 list boxes and I want one to effect the other, in a one to one relationship.

So for example, if I have list 1> a. b. c. d. etc
this links to list 2> a. b. c. d. etc
but you can then "override" list 2> if need be.

Does that make sense? (told ya my brain was fried).

If so can you help..

Cheers Az

-------
Eagles fly!, but weasels don't get sucked into jet engines.

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 06 March 2002 :  07:31:06  Show Profile  Send ruirib a Yahoo! Message
Sorry, the override thing lost me. Wanna make it a bit more clear to see if I can help?

And do you want to do it using ASP, that is choose something on List1, submit the form to have List2 behaving accordingly, right?

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 06 March 2002 :  08:00:36  Show Profile  Visit Azaniah's Homepage
Yeah,

OK as an example if you had countries as list 1, and timezones as list 2.

For a lot of countries there is a one to one relationship. Ie in the UK you are always GMT. In the US however you can have several timezones, so you need to be able to "override" or change the selection in list 2.

Does that explain it better?

Cheers Az

-------
Eagles fly!, but weasels don't get sucked into jet engines.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 06 March 2002 :  08:07:44  Show Profile  Send ruirib a Yahoo! Message
quote:

For a lot of countries there is a one to one relationship. Ie in the UK you are always GMT. In the US however you can have several timezones, so you need to be able to "override" or change the selection in list 2.



Ok. You didn't tell me if you wanted and ASP based solution, that is, on changing List1, submit the form to the same script and set List2 contents depending on the option chosen for List1.

This is easy to do. I think you probably could also do it with a client-side script. But it would be a harder to code solution...

What's gonna be?

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 06 March 2002 :  08:11:59  Show Profile  Visit Azaniah's Homepage
I'm not sure to be honest.

ASP I guess.

Would you be thinking Javascript otherwise?

Cheers Az


-------
Eagles fly!, but weasels don't get sucked into jet engines.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 06 March 2002 :  08:20:14  Show Profile  Send ruirib a Yahoo! Message
quote:

I'm not sure to be honest.

ASP I guess.

Would you be thinking Javascript otherwise?



I guess the alternative would be Javascript, indeed, although I would need much study to code it myself .

The issue with the ASP is that you have to submit the form, thus reloading the page to have the contents of the 2nd list changed. I can live with that (have it in my site). Just don't know if that's OK with you.

Where will the values for the lists come from? A DB?

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 06 March 2002 :  08:23:48  Show Profile  Visit Azaniah's Homepage
More than probably a DB, but they can be within the ASP Page.

I don't mind about the refresh of the page..

Cheers Az

-------
Eagles fly!, but weasels don't get sucked into jet engines.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 06 March 2002 :  08:30:11  Show Profile  Send ruirib a Yahoo! Message
quote:

More than probably a DB, but they can be within the ASP Page.

I don't mind about the refresh of the page..



So it looks easy. Just create the first list in such a way that, on selection, it will submit itself (you can look at the Snitz code, because it's done that way).

For the second list, just create SQL to get the contents for it depending on the value chosen for the first list.

Do you need a coding sample for this. It can be lengthy, but can be provided (I guess I can just copy my own code).

If you need code I'll need a little bit more time to provide it. I just need to leave for 3 or 4 hours, but I'll get back to you then...

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 06 March 2002 :  09:02:26  Show Profile  Send ruirib a Yahoo! Message
Azaniah

If you email me your email address I'll send you a ASP file implementing this. It will probably be easier that way.

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

seahorse
Senior Member

USA
1075 Posts

Posted - 06 March 2002 :  20:44:04  Show Profile  Visit seahorse's Homepage
quote:

Yeah,

OK as an example if you had countries as list 1, and timezones as list 2.

For a lot of countries there is a one to one relationship. Ie in the UK you are always GMT. In the US however you can have several timezones, so you need to be able to "override" or change the selection in list 2.



Azaniah,

Is something like this what you are looking for?http://www.aspfree.com/authors/salimn/optionex.asp

Ken

===============
The greatest tragedy is a child without a loving parent.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07