diff -r d0f7b4ab000f -r 98c2afc88780 www/js/rec_export.js --- a/www/js/rec_export.js Thu Feb 28 22:50:58 2019 +0100 +++ b/www/js/rec_export.js Fri Mar 01 14:29:09 2019 +0100 @@ -23,5 +23,38 @@ $(document).ready(function () { + var choice = 0; + $("#name").html(my_name); + $("#jqxRadioButton1").jqxRadioButton({ theme: theme, width: 250, height: 23 }); + $("#jqxRadioButton2").jqxRadioButton({ theme: theme, width: 250, height: 23 }); + $("#jqxRadioButton3").jqxRadioButton({ theme: theme, width: 250, height: 23 }); + $('#jqxRadioButton1').on('checked', function (event) { + $('#Start').jqxButton({ disabled: false }); + choice = 1; + }); + $('#jqxRadioButton2').on('checked', function (event) { + $('#Start').jqxButton({ disabled: false }); + choice = 2; + }); + $('#jqxRadioButton3').on('checked', function (event) { + $('#Start').jqxButton({ disabled: false }); + choice = 3; + }); + + $('#Start').jqxButton({ template: "success", width: '100px', theme: theme, disabled: true }); + $('#Start').click(function () { + if (choice == 1) { + var url="rec_beerxml.php?record=" + my_record; + window.open(url); + } else if (choice == 2) { + var url="rec_duplicate.php?record=" + my_record; + window.open(url); + } else if (choice == 3) { + var url="rec_toproduct.php?record=" + my_record; + window.open(url); + } + // Return to the original product + window.location.href = my_return + "?record=" + my_record; + }); });