Jyothi Posted May 18, 2007 Share Posted May 18, 2007 Hi I've been trying to display some list items in drop down boxes. The list holds items such as Product Design Size Paper Color Finish Quantity Total Turnaround I Agree (check box) Am intending to do this : It needs to be able to add products to or change prices and for members a little cheaper. and then I need one that just multiplies length and height. and multiplies it by price per sq. ft. Can you please gimme ideas as to how can i use do this, i mean to be able to add products and check if member then show cheaper prices and then do the multiple. Any help is highly appreciated! Thanks in advance Jyothi Quote Link to comment https://forums.phpfreaks.com/topic/51946-some-issue-with-drop-down-boxes/ Share on other sites More sharing options...
Jyothi Posted May 18, 2007 Author Share Posted May 18, 2007 Any Help please. Awaiting for your response Quote Link to comment https://forums.phpfreaks.com/topic/51946-some-issue-with-drop-down-boxes/#findComment-256111 Share on other sites More sharing options...
neel_basu Posted May 18, 2007 Share Posted May 18, 2007 What have you tried and thought so far ?? Quote Link to comment https://forums.phpfreaks.com/topic/51946-some-issue-with-drop-down-boxes/#findComment-256121 Share on other sites More sharing options...
Jyothi Posted May 18, 2007 Author Share Posted May 18, 2007 FIrst i fill in the first list of the box, then i fill in the second list box dynamically based on the values selected in the first box. As an example , shown below function fillCategory(){ // this function is used to fill the category list on load addOption(document.drop_list.Category, "Products", "Products", ""); addOption(document.drop_list.Category, "Design", "Design", ""); addOption(document.drop_list.Category, "Size", "Size", ""); addOption(document.drop_list.Category, "Paper", "Paper", ""); addOption(document.drop_list.Category, "Color", "Color", ""); addOption(document.drop_list.Category, "Finish", "Finish", ""); addOption(document.drop_list.Category, "Quantity", "Quantity", ""); addOption(document.drop_list.Category, "Total", "Total", ""); addOption(document.drop_list.Category, "Turnaround", "Turnaround", ""); } function SelectSubCat() { // ON selection of category this function will work removeAllOptions(document.drop_list.SubCat); addOption(document.drop_list.SubCat, "", "SubCat", ""); if(document.drop_list.Category.value == 'Products') { addOption(document.drop_list.SubCat,"TV", "TV"); addOption(document.drop_list.SubCat,"Mobile", "Mobile"); addOption(document.drop_list.SubCat,"Laptop", "Laptop"); } if(document.drop_list.Category.value == 'Design') { addOption(document.drop_list.SubCat,"ABC", "ABC"); addOption(document.drop_list.SubCat,"XYZ", "XYZ"); addOption(document.drop_list.SubCat,"PRQ", "PRQ", ""); } if(document.drop_list.Category.value == 'Size') { addOption(document.drop_list.SubCat,"10", "10"); addOption(document.drop_list.SubCat,"05", "05"); addOption(document.drop_list.SubCat,"15", "15"); } } function removeAllOptions(selectbox) { var i; for(i=selectbox.options.length-1;i>=0;i--) { //selectbox.options.remove(i); selectbox.remove(i); } } function addOption(selectbox, value, text ) { var optn = document.createElement("OPTION"); optn.text = text; optn.value = value; selectbox.options.add(optn); } But am still trying to figure out how can i show the price cheaper for members and change the weight height!! If any ideas on this, it would be of great help. Quote Link to comment https://forums.phpfreaks.com/topic/51946-some-issue-with-drop-down-boxes/#findComment-256143 Share on other sites More sharing options...
Jyothi Posted May 18, 2007 Author Share Posted May 18, 2007 Though for the check box , i'll have some thing like <INPUT TYPE="checkbox" NAME="I Agree"> Quote Link to comment https://forums.phpfreaks.com/topic/51946-some-issue-with-drop-down-boxes/#findComment-256148 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.