Dynamic Selection?

Laptop Buttons
Got a use case where the User selects a laptop button, and the specs appear on the right.

So the requirements are:

1) Dynamic data is pushed to the sidebar
2) The data (laptop specs) are stored in the Drupal database

And longer term..

3) The data (laptop specs) might come in via web service as more laptop buttons are offered.

What's the best approach for #1 & #2, and what technologies should I consider for #3?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Drupal has an api for Ajax forms. You would make the buttons submit buttons and when that is clicked it would do a callback to retrieve the HTML or JSON which is used to replace the sidebar.

So you would create your own custom form that defines the buttons. You would need a menu item callback to process the button clicked and return your data for the sidebar and you would beed to create a placeholder in the sidebar for you to replace.

This should be possible with no JavaScript if you return HTML from your callback.

See here for how to create an Ajax form:

Kind regards,
Going forward you could make the request for data in your callback function or do it all in JavaScript however it would be best for the data to be stored when you add a laptop. That way you can still display the data if the other site or service is down. There is the amazon associates module which I think works in this way so you could have a look at that code. Essentially when a node is saved, it requests the data and saves it as extra fields in the node.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sandshakimiAuthor Commented:
How much of this is done via the GUI versue custom module?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.