gunaweb Posted July 24, 2014 Share Posted July 24, 2014 (edited) Hi All, How can I replace the "Non-recurring default script" with "Recurring script" buttons when the checkbox is checked? I can only go this far: http://jsfiddle.net/k53nv/ Buttons sample: 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> I need to drop the full HTML code/script to my WordPress website. Thank you in advance. Edited July 24, 2014 by gunaweb Link to comment Share on other sites More sharing options...
johncc Posted July 24, 2014 Share Posted July 24, 2014 I would suggest including both scripts in the one function/script, set a variable based on the checkbox setting and use an if statement to execute the appropriate code. Link to comment Share on other sites More sharing options...
gunaweb Posted July 24, 2014 Author Share Posted July 24, 2014 Hi jonhcc, thank you for your suggestion but that's where I am stuck now. I am a web designer who forced myself to do more programming ...and can't go beyond that. Do you think you can give me an example with the actual codes? Cheers! Link to comment Share on other sites More sharing options...
johncc Posted July 26, 2014 Share Posted July 26, 2014 (edited) Not exactly clear about what you want to achieve, but in your check function instead of setting 'result', can't you just insert the recurring or non-recurring code (or a call to it) as appropriate. Edit: It occurred to me after answering with the sentence above that you may want another button, the action of which is altered depending on the setting of the checkbox. Is that correct? Edited July 26, 2014 by johncc Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now