0

How can I replace the "Non-recurring default script" with "Recurring script" when the checkbox is checked?

The checkbox:

<input type="checkbox" value="1" />Auto-deliver this product

Non-recurring script (default):

<script type="text/javascript" src="https://03a4d20.netsolstores.com/add-a-store.aspx?pid=4&lid=8"></script>

Recurring script:

<script type="text/javascript" src="https://03a4d20.netsolstores.com/add-a-store.aspx?pid=1&lid=8"></script>
William Barbosa
  • 4,936
  • 2
  • 19
  • 37
GHS
  • 1
  • 1
  • See if this post solves your problem:http://stackoverflow.com/questions/8295394/dynamically-change-the-src-of-a-script-tag – Sunil Hari Jul 16 '14 at 06:45
  • you can do this like described in this problem: http://stackoverflow.com/questions/21364741/how-to-change-the-source-of-a-picture-by-the-outcome-of-checkboxes just update the script params after changing the checkbox state – roman Jul 16 '14 at 07:00
  • Thank you @Shadow and roman, I think I am still lost. I found this and is pretty close to what I need. [link](http://jsfiddle.net/gunaweb/k53nv/3/). But I can't seems to figure out how to replace -- var a = "product1 - recurring" -- with the actual scripts. – GHS Jul 19 '14 at 03:59
  • Can anybody please help me on this :-( ? – GHS Jul 25 '14 at 19:19

0 Answers0