The situation
I am implementing a few forms using the Drupal Form API. As a result of user selection i need to display a visualization (area chart, time line, etc) where i have to load the google's JS libraries and send data to display the visual in a div element.
What I have Done:
I have tried to load a local JavaScript file(this in turn loads Google VIZ api) using drupal_add_js in the submit handler functions of the form and i added some HTML code using echo for the < DIV> element.
The problem:
Apparently this does not work. Please suggest a solution or any alternate methods. The one i have thought of doing is to use form_redirect to another node where i have all the HTML and JavaScript Code, but i would like the results to appear on the same URL. If you need further details or any clarification please comment.
Thank you for your patience.