i am learning php
along with mysql
and so developing a e-comm site it is very exiting when i get hindered by some error but this time it just a html
thing that has stopped my constuction.
so, i have to populate 2 <select>
tags in a addProduct form for Category
and sub-category
but i need to work on onChnage
event for category
select list, as to populate the sub-category
select list on basis of the user selection in category
select list. i have searched a lot and some how i can do it but i want to know what are the possible ways and what is the safest way? also can i build a php function to do this if yes how to get the element value without submitting the form since it will submit all the form data that will empty all other fields.
thank you!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…