This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
i am making a program in a JSP. i have used some java script code in this program.
by this program i can find out the result for between years for any class.
i have three combo box for class_name, from_year, to_year. for class_name, Its value is 1 to 12. when i select class 11 or 12, an combox appear for subject having values Arts, comerce and science will be appeared.
in database for class 1 to 10 having subject values is AllSubject. and for class 11 or 12 having subject values arts, commerce and science.
my problem how i make the query which send for class 1 to 10 , assume subject values is all and for class 11 or 12 subject values arts, commerce and science with others combox values.
Here is JSP's files:
the combo box for subject remain hide when i select class 1 to 10. but if i select class 11 or 12 then
value for subject is Arts, Commerce and Science. how i make query from database base on the subject.
if i select class 1 to 11 the value for subject is all. if i am selected class 11 or 12 then query include the value of combo box subject
I'm not quite sure what you're asking: are you asking how to make a request from the browser to the server, or how to show an element based on the value of another, or...? Could you try asking it in a different way?
Moving to JSP, although the HTML is very broken, and contains some suspicious tags, which should not be used.
Also note that you will be told not to do any Java programming in your JSP files--this is good advice.
Joined: Aug 17, 2009
In database for class 1 to 10 having value for subject is all. and for class 11 or 12, having value arts, commerce and science.
if i select class 1 to 10 from combo box for class then subject remains hide, after submit its show the result. it will show the result for a class having subject is all.
because in database for class 1 to 10 the subject value is all, but when i select class 11 or 12, then a combo box for subject appear and its value will be Arts, Commerce and Science. then when i select subject any one from these. suppose i select class 11 or select subject science, after submit it go for query from database for a class 11 and for subject science.
how i find the result for a science subject for a class 12.
i am not able to make query that find the result when i select class 11 or 12 for a particular subject.