PDA

View Full Version : Chained Select to load xx.html into div on same page



mobius2000
08-28-2010, 11:55 AM
1) Script Title: Chained Selects

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex16/chainedselects/index.htm

3) Describe problem:

Ok, I've made up my "chained select" menus and have it working properly however to achieve what I need, I effectively need to combine the "Chained Selects" with another Dynamic Drive script, "Dynamic Ajax Content" (http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm).

I am trying to have the user select from my two select menus and once they select from the final select menu, it loads a separate HTML page into my DIV, same as done on "Dynamic Ajax Content".

I am a very weak coder so any help would be greatly appreciated.

Richard.

mobius2000
09-08-2010, 12:28 PM
I have determined that the following lines of code are those that need to be changed for the AJAX call but was hoping someone could assist further... I am real n00b and really struggling here.



function goListGroup(){
for (i=arguments.length-1;i>=0; i--){
if (arguments[i].selectedIndex!=-1){
var selectedOptionvalue=arguments[i].options[arguments[i].selectedIndex].value
if (selectedOptionvalue!=""){
if (onclickaction=="alert")
alert(selectedOptionvalue)
else if (newwindow==1)
window.open(selectedOptionvalue)
else
window.location=selectedOptionvalue
break