CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Listbox and Text box Validation and hiden

Print topic Send  topic

Author Message
janiali

Posts: 44
Posted: 12/11/2007, 8:09 AM

Hi every one Seniors in CCS
could some one please help me in Disabling a text box if that is not related to my listbox selected value .
the secnario is I have one listbox having activities and then I have activites type . I have 3 activites types .
Male Female and Numbers and Curency .
what I want is if a user will select any activity from the list box and that activity is related to Male femal than other two text box should be disable and if the activity slected by user is belong to curency type then Male femal and numbers should be disable so user can't put value in that disabled control .

I have one table Activites and one for Activiy_type Table Activites has ActID is primary key for Activites table and foreign key is ActtypeID .

Please help
thankd
Jani

_________________
Jani Ali
View profile  Send private message
Oper


Posts: 1195
Posted: 12/12/2007, 1:14 PM

This on is a little more tricky

since depend of some flag or info of the Data of the listbox.

unless the data on the Listbox wont change
and for advanced you know wich ID are what and what not, then will be easy

ej: if ID from 1 to 6 fro woman and ID from 7 to 15 fro men is easy


_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
janiali

Posts: 44
Posted: 12/12/2007, 9:41 PM

Quote Oper:
This on is a little more tricky

since depend of some flag or info of the Data of the listbox.

unless the data on the Listbox wont change
and for advanced you know wich ID are what and what not, then will be easy

ej: if ID from 1 to 6 fro woman and ID from 7 to 15 fro men is easy



Thanks for the Reply .
it is from my side simple . like all activities have one ActtypeID in the same table for example
I have 200 Activitites and all are only three type some are for Male Female some are numbers and some are Currency .
So I want if some one select the activity in the listbox which is belong to Male female so other two text box should be disable so user can't put any thing is those textbox .

like you have the Idea of my table one is tblactivity and one is tblActType and fields are as below
TblActivity = ActID,ActTpyeID,ActProgramID,ActName
TblActType=ActypeID,ActTypeName.

just FYI that Activities Listbox is a dependant listbox of programs Listbox .
thanks
Jani

_________________
Jani Ali
View profile  Send private message
janiali

Posts: 44
Posted: 12/12/2007, 10:08 PM

in other way you can think like this
if control listbox ActtypeID =1 then disable cotrol textbox numbers and currency and if ControlListbox ActtypeID=2 then disalble control Textbox Male Female and Currency and if Control Listbox ActtypeID=3 then disable control Textbox Male femal and numbers.

that is just an quick Idea What logic I am assuming

Thanks
Jani

_________________
Jani Ali
View profile  Send private message
Oper


Posts: 1195
Posted: 12/13/2007, 7:30 AM

jani you have 2 listbox wich one frist or second?

in advance,
For first listbox is a litle easy but for the second listbox will need a litle more hardwork.
(and will be preferible AJAX for that)

hope is the first of the Both Dependant listbox

_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
janiali

Posts: 44
Posted: 12/13/2007, 8:25 AM

Quote Oper:
jani you have 2 listbox wich one frist or second?

in advance,
For first listbox is a litle easy but for the second listbox will need a litle more hardwork.
(and will be preferible AJAX for that)

hope is the first of the Both Dependant listbox


if you see the that page of my application so the first one is "Program " and the second one is "Activities" so actually Activites is that list box and this is dependent list box of Program List box .
so I need to disable the text box like Male female numbers Currency should be bound to the Activites list box .
I will just explain it like this

I have 5 Program and each program has more than 100 Activites and there are 3 type of activities one is Male femal second is number and the third is curency .

Thanks for the Help
Jani




_________________
Jani Ali
View profile  Send private message
Oper


Posts: 1195
Posted: 12/13/2007, 1:35 PM

without AJAX another simple solution

* did you understan what you did whne you choose programa and
you call only the activities needit for that?

* Do the same for the second ListBOX. (Give a try we will follow)




_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
janiali

Posts: 44
Posted: 12/13/2007, 1:47 PM

Quote Oper:
without AJAX another simple solution

* did you understan what you did whne you choose programa and
you call only the activities needit for that?

* Do the same for the second ListBOX. (Give a try we will follow)





Hi Oper thanks for the reply

for the Program I have made the on change custom code
"window.location.href = "tblPIP_list.asp?programID=" + this.value ;" and then in the activityes listbox DataSource I mention ProgramID = ProgramID (URL)
so in this case how it will again take the URL value and I can't mention any thing is textbox DataSource

Please give me some clue
Thanks
Jani


_________________
Jani Ali
View profile  Send private message
Oper


Posts: 1195
Posted: 12/19/2007, 5:55 PM

i'm trying to find out what will be the best choice for you without using JAVA nither AJAX
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
Oper


Posts: 1195
Posted: 12/20/2007, 5:18 PM

i got one simple without AJAX but you will have to make some changes.

Will test saturday morning and will show you how.
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
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.

MS Access to Web

Convert MS Access to Web.
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.