Link to home
Start Free TrialLog in
Avatar of mobius1980
mobius1980

asked on

Chained Select Menus + Load AJAX content

Hi Experts,

I am using a script from Dynamic Drive (View script here) to have chained select menus.

In the example I have attached, I have set this up with 2 chained menus and it all works fine, I can easily make the final select menu take the user to a new page however I am trying to make the final selection load in a HTML page inside a div within the same page as opposed to leaving this page.

I am a very weak coder and hoping one of you great experts may be able to assist with this in some way.

Any help at all would be greatly appreciated.
sample.zip
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

In the 'goListGroup' method of chainedmenu.js, you need to make the ajax call rather than using window.location or window.open.

for making ajax call see
http://www.w3schools.com/ajax/default.asp
http://www.ajaxtutorial.net/
Avatar of mobius1980
mobius1980

ASKER

I'm sorry, you lost me... When I said I am a weak coder, I mean very weak coder.  :-)

I presume you mean between line 26 and 30?


else if (newwindow==1)
window.open(selectedOptionvalue)
else
window.location=selectedOptionvalue
break

Open in new window

Yes, instead of these, you have to make an ajax call to these locations.
Ok, I'm still no closer to a result here... I apologise for being a pain, I'm not asking you to write the code for me but I am simply lost. Everything I have tried just either loads a new page or does nothing.

Anybody else able to provide a little assistance for a complete n00b like myself?  :-)
ASKER CERTIFIED SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial