alanl1 Posted June 18, 2013 Share Posted June 18, 2013 Hi All. I have a javascript function that changes the value of the next dropdown box from a list of multiple dropdown boxes based on an onchange event as shown below. What I want to do is if the user selects for instance "software manufacturer" then it is never available again in any of the next dropdown boxes. I can get this to work for the next checkbox but it comes back again for the 3rd checkbox. Hope it makes sense onchange="fillSelect(this,categories[this.value] var categories = []; categories["startList"] = ["Software Manufacturer","Product Name","Product Version","Keep Existing","Ignore"] categories["Software Manufacturer"] = ["Product Name","Product Version","Keep Existing","Ignore"]; categories["Product Name"] = ["Software Manufacturer","Product Version","Keep Existing","Ignore"]; categories["Product Version"] = ["Software Manufacturer","Product Name","Keep Existing","Ignore"]; categories["Keep Existing"] = ["Software Manufacturer","Product Name","Product Version","Keep Existing","Ignore"]; categories["Ignore"] = ["Software Manufacturer","Product Name","Product Version","Keep Existing","Ignore"]; Quote Link to comment Share on other sites More sharing options...
doddsey_65 Posted June 18, 2013 Share Posted June 18, 2013 If I understand correctly you are populating the select boxes with the categories array? If so then in the onchange you would check to see if the selected value is in the next object array. So if they chose Product Name in the startList select box you would remove Product name from the Software manufacturer object array. Quote Link to comment Share on other sites More sharing options...
alanl1 Posted June 18, 2013 Author Share Posted June 18, 2013 Hi Doddsey I agree with what your saying but I have no idea how to do that as I am new to php,javascript Quote Link to comment 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.