Skip to main content

processing.js change script source



I need to find a way where I can dynamically change the source of a processing script inside an HTML document.





This is the embedded script which works fine:







<script type='application/processing' src='sketch.txt' id="applet">

</script>







Now I try to change the source:







$('#applet').attr('src', 'sketch2.txt');

alert($('#applet').attr('src'));







The alert shows that the source was changed to 'sketch2.txt' but the applet still remains the same. I think I need to refresh the script in some way.





Thank you in advance for any help!


Comments

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?