0

I have a input control in my HTML file set week?

I'd like to allow a user to use the control to set week they want. I will then need to get the Julian of that day so I can populate my grid with the 5 workdays of that week. I can't seem to get the week number from the contol. I am somewhat limited because this is in an Extension. I get this error when I try to get the value of the control from my popup.js.

Refused to execute inline event handler because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.

function set_theweek()
{
var x=document.getElementById("week").value;
var currentTime = new Date();   
var week=getWeek(currentTime);
}   
melpomene
  • 84,125
  • 8
  • 85
  • 148
  • Possible duplicate of [The Chrome extension popup is not working, click events are not handled](https://stackoverflow.com/questions/17601615/the-chrome-extension-popup-is-not-working-click-events-are-not-handled) – Matus Dubrava Apr 22 '18 at 19:30

1 Answers1

0

I got this working by stacking a button next to the week control and using update '←. I still need to go from a week number to the date for monday of that week.