When I try to pass variables to check_holiday_dates_on_application I want them to be surrounded by ‘ in the site html. This is what my code looks like:
'onchange' => 'return check_holiday_dates_on_application('' . $this->Url->webroot('') . '', '' . $token . '',' . json_encode($abstractionDayList) . '');']); ?>
What I want is
onchange="return check_holiday_dates_on_application('webroot',token','abstractionDayList');"
What I get is
onchange="return check_holiday_dates_on_application('webroot', 'token',abstractionDayList');"
Can anyone help me out?
2
Answers
Worked with setting the parameter
Thanks for the answer @Greg Schmidt in the comments.
Try this, hope it helps