Categories | Question details Back To List | ||
Replace text with combo, save change to combo, then reflect change back to page Hello, I have a page which shows a list of rooms where travelers can be placed... Each room has 4 slots to accept travelers, and the travelers are already in the database in a related table. Each of these slots has an "edit" link, and then displays the travelers' name, if there is one. Upon selecting the edit link, I want to replace the static name with a combo, and then as soon as a change is made, I'd make a get request like this: ChangeTraveler.asp?TravelerID=1704&OldID=123&NewID=321 The data relations go sort of like this: Groups --> Rooms --> Travelers <-- TourTravelers After submitting the change, we'd just need to reflect back some status to the user. I've made some progress on this so far, but any tips you may have would be greatly appreciated! --Jon Answer posted by Alex (support) on Dec 02, 2009 07:53 Hello, combo has onChange. It is called each time the combo value changed. combo.attachEvent("onChange",function(){ var value = combo.getActualValue(); /* your code here */ }) You can use this event to execute the necessary action: for example you can reload other combos when the value is changed or send Ajax request to pass selected value to the server.
Answer posted by CoastalData on Dec 02, 2009 08:47 Okay, that's cool, I was wondering how to get the value out of it, but how do I get the postback to the original page? Answer posted by Alex (support) on Dec 03, 2009 02:37 You can use Ajax to pass selected value to server-side script. |