dinoslikeroar Posted January 18, 2018 Share Posted January 18, 2018 How can I take this below and put it into a script that includes this file and makes sure that it gives a date? I need to check to make sure the function is producing a date. Right now when clicking on the field Complete or Cancel it doesn't produce the date it use to but doesn't anymore. $today_plus_five = maj_get_nth_business_day_from_now(5); $today_plus_twenty = maj_get_nth_business_day_from_now(20); $page_javascript .= " function set_action_date(action_date) { document.getElementById('date_action_needed').value=action_date; } $(function() { $.datepicker.setDefaults($.datepicker.regional['']); $('#date_action_needed').datepicker(); $('#date_action_needed').datepicker('option', {dateFormat: 'm/d/yy'}); }); "; $processing_type_radios = "<input type='radio' name='processing_type' value='Complete' onclick='set_action_date(\"$today_plus_five\")' "; if ($processing_type == "Complete") $processing_type_radios .= " CHECKED "; $processing_type_radios .= "> Complete"; $processing_type_radios .= "<input type='radio' name='processing_type' value='Cancel' onclick='set_action_date(\"$today_plus_twenty\")'"; if ($processing_type == "Cancel") $processing_type_radios .= " CHECKED "; $processing_type_radios .= "> Cancel"; Quote Link to comment Share on other sites More sharing options...
dodgeitorelse3 Posted January 18, 2018 Share Posted January 18, 2018 I think I see one problem at end of function Quote Link to comment Share on other sites More sharing options...
ginerjm Posted January 18, 2018 Share Posted January 18, 2018 Huh? Not only do I not follow what you are saying, but your code is such an incomplete snippet that it makes no sense at all. You're building some kind of JQ code in your php logic (instead of just outputting it as part of your resulting web page) but you create some html elements that we have no idea of where they end up. Really - perhaps you could be a little clearer in your question? PS - I love the title! "Writing a script to produce outcome". Isn't that what EVERYONE does? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.