Enable a javascript plugin on button press -


i have webpage on there button.
on button press, intent embed script in head section of page enable plugin. can manually insert snippet , plugin want able on button click keep optional element users.
way go this?

as per @padde's query, script looks following way include in header:

<script type="text/javascript" src="http://code.abc.com/farfalla.js"></script> <script type="text/javascript" src="http://code.abc.com/postmessage.js"></script> 

use createelement() of javascript , add dom

check below link more information : http://www.hunlock.com/blogs/howto_dynamically_insert_javascript_and_css

if using jquery can use $.getscript load external js file.

$.getscript('filename.js',function(){ //your code ... }); 

Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -