The scenario is that I'd like to update a javascript snippet (that renders a widget) when a user clicks a button.
The idea is that a user can enter a number of parameters to configure their widget and then click a button to see a preview of it.
Is there a way to do this via jquery?
The snippet would look something like this:
<script type="text/javascript"><!--
var yoc_w_frame = "SiteName";
var yoc_home = "HomePath";
var yoc_w_width = 300;
var yoc_w_height = 250;
//--><script>
<script type="text/javascript" src="http://domain.com/js/js.js"></script>
I tried $("#divTest").append( script );
where script is a var that holds the built up script string.