If I had a HTML page that was completely clean, how can I with Javascript be able to click on a button located in the body of the page that dynamically adds a div and the appropriate .js scripts to include in order to show a basic workin openlayers map? Any sample would be appreciated. Its easy for me to click on a button to dynamic add a div with id "map", but I am not sure how to get dynamically include the .js script to have it be applied to the div tag.
Asked
Active
Viewed 1,109 times
1 Answers
0
Create and place a <div>
when user clicks a button:
Easiest way to dyanmically load a DIV on button click?
Dynamically load JavaScript source: Ways to add javascript files dynamically in a page
-
What is recommended for the dynamic loading of the JS that does something to the created DIV? – Rolando Jul 17 '12 at 03:06